Forum Discussion

bharath_yarlagadda's avatar
bharath_yarlagadda
Copper Contributor
Oct 05, 2023

HttpPost in Notifications via Webhook Connector on teams is failing with InternalServerError

HttpPost in MessageCard for Notifications via Incoming Webhook Connector on teams is failing with InternalServerError/ExchangeServiceException
We are generating notifications on Teams Channels using Incoming webhook connector.

Heres a sample:

 

 

 

 

curl -X POST "incoming_webhook_url" -d '{
    "@context": "https://schema.org/extensions",
    "@type": "MessageCard",
    "themeColor": "1f9cd6",
    "text": "hello",
    "summary": "hello",
    "sections":
    [],
    "potentialAction":
    [
        {
            "@type": "ActionCard",
            "name": "Update Status",
            "inputs":
            [
                {
                    "@type": "MultiChoiceInput",
                    "id": "mc_status_update_action",
                    "title": "Update Status",
                    "choices":
                    [
                        {
                            "display": "No Status",
                            "value": "no_status"
                        },
                        {
                            "display": "Fixed",
                            "value": "fixed"
                        },
                        {
                            "display": "Expected",
                            "value": "expected"
                        },
                        {
                            "display": "Investigating",
                            "value": "investigating"
                        },
                        {
                            "display": "False Positive",
                            "value": "false_positive"
                        },
                        {
                            "display": "No Action Needed",
                            "value": "no_action_needed"
                        }
                    ]
                }
            ],
            "actions":
            [
                {
                    "@type": "HttpPOST",
                    "name": "Submit",
                    "target": "https://webhook.site/74e7774b-6edd-4119-a572-7106f69980fb",
                    "body": "{\"action_id\": \"mc_status_update_action\"}"
                }
            ]
        }
    ]
}' -H "Content-Type: application/json"

 

 

 

 


The action button for submit should do a HttpPost call back to the "https://webhook.site/74e7774b-6edd-4119-a572-7106f69980fb" . But this call is consistently failing with InternalServerError or ExchangeServiceException. We can successfully make calls to this webhook manually.

On inspecting network calls on the browser

heres the payload sent to /executeAction endpoint when we click on submit button in teams notification message.

*** Email address is removed for privacy ***

 

 

 

{
    "inputParameters":
    [
        {
            "id": "mc_status_update_action",
            "value": "investigating"
        }
    ],
    "actionId": "7e2eae22-3edf-41f3-b419-6f7b2ad1f480",
    "potentialAction": "{\"@type\":\"HttpPOST\",\"@id\":\"7e2eae22-3edf-41f3-b419-6f7b2ad1f480\",\"name\":\"Submit\",\"target\":\"https://webhook.site/74e7774b-6edd-4119-a572-7106f69980fb\",\"headers\":[],\"body\":\"{\\\"action_id\\\": \\\"mc_status_update_action\\\"}\",\"bodyContentType\":\"\"}",
    "name": "action/connector",
    "integrationId": "lk2mssdku5",
    "meta": "{\"connectorSenderGuid\":\"203a1e2c-26cc-47ca-83ae-be98f960b6b2\",\"providerAccountUniqueId\":\"\",\"connectorConfigurationAlternateId\":\"3207cad15c4e4115a83b4b247ea63d5f\"}",
    "clientInfo":
    {
        "locale": "en-us",
        "country": "us",
        "platform": "Web",
        "clientVersion": "1415/1.0.0.2023090810"
    }
}

 

 

 

Response:

 

 

{
    "status": "Failed",
    "actionId": "7e2eae22-3edf-41f3-b419-6f7b2ad1f480",
    "properties":
    {
        "displayMessage": "",
        "errorCode": "ExchangeServiceException"
    }
}

 

 

Any reason why this might be failing? Are we missing any settings?

  • bharath_yarlagadda - Thanks for reporting your issue. 
    Could you please verify below checkpoints?

    1. Check the webhook.site URL permissions: Ensure that the webhook.site URL is added as an Action URL in the connector developer dashboard and as a valid domain in the connector manifest.json.

    2. Check the format of your JSON payload: Ensure that the JSON payload you're sending is correctly formatted. Incorrectly formatted JSON can often lead to errors.

    3. Check the status of the webhook.site: If the issue persists, try using a different webhook.site. There might be an issue with the current webhook.site you're using.

    4. Check the API called Execute Action: If you're receiving a 403 forbidden error, it might be due to the API called Execute Action. Ensure that this API has the correct permissions to execute.

    • Nivedipa-MSFT's avatar
      Nivedipa-MSFT
      Icon for Microsoft rankMicrosoft
      bharath_yarlagadda - Have you checked the checkpoints mentioned above? Could you please confirm whether your issue is resolved or if you are still experiencing it?
      • bharath_yarlagadda's avatar
        bharath_yarlagadda
        Copper Contributor

        Nivedipa-MSFT 

        1. I tried with a different webhook site link. I m able to make this call and see the call pop on the webhook site. 

        curl -X POST https://webhook.site/86b6a1c9-cca2-4739-bcfa-89728b0edf4f -d '{}'

         

Resources