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

Copper Contributor

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?

8 Replies

@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.

@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?

@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 '{}'

 Screenshot 2023-10-11 at 7.29.04 AM.png

@bharath_yarlagadda 

step 2:

I even tried an empty json payload to /executeAction

{
    "inputParameters":
    [
        {
            "id": "mc_status_update_action",
            "value": "investigating"
        }
    ],
    "actionId": "55451c61-97b4-4da0-81b1-743d4efcad91",
    "potentialAction": "{\"@type\":\"HttpPOST\",\"@id\":\"55451c61-97b4-4da0-81b1-743d4efcad91\",\"name\":\"Submit\",\"target\":\"https://webhook.site/86b6a1c9-cca2-4739-bcfa-89728b0edf4f\",\"headers\":[],\"body\":\"{}\",\"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.2023092925"
    }
}

It still failed with following error

 

for step 3:
I tried different endpoints which are reachable using curl but failing on ms teams.

For step 4:
As you can see in the pictures above executeAction returns status as 200 but fails with ExchangeServerException.
@Nivedipa-MSFT
We are still seeing this issue. Can you please help us?

@bharath_yarlagadda  - Could you please share your tenant id for investigation of  this issue with engineering team. And also please repro the issue once again to generate fresh logs, So that engineering team could check those logs.

Hello @bharath_yarlagadda - Could you please try to repro the issue again, so that engineering team can get the logs based on your provided details like: Teant id, timestamp etc.