Msteams-docs: HttpPOST from MessageCard invoke failed

Created on 7 Nov 2018  Â·  37Comments  Â·  Source: MicrosoftDocs/msteams-docs

The HttpPOST request failed.
Any request has not been reached target endpoint.

I posted MessageCard using Incoming Webhooks with payload below.

  {
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "text": "Larry Bryant created a new task",
    "potentialAction": [
        {
          "@type": "HttpPOST",
          "name": "Add comment",
          "target": "http://xxxxxxxxx.ngrok.io/comment"
        }
    ]
  }

Error messages.

[O365ActionPaneController.makeHttpPOSTRequestForConnector()] Http invoke failed: {"data":{"errorCode":"InternalServerError","message":"Failed to execute AEA backend request ConnectorActionRequest. Request Url: https://outlook.office.com/actions/b9a9ddf0-c129-4524-8ea3-bf87fbc8b05d/executeAction/?culture=ja-jp, Request Method: POST, Response Status Code: InternalServerError, Response Headers: X-MSEdge-Ref: Ref A: 28F5CFD870AC4CA88541821C84BC7ED7 Ref B: HK2EDGE0720 Ref C: 2018-11-07T15:32:41Z\r\nDate: Wed, 07 Nov 2018 15:32:41 GMT\r\nX-AspNet-Version: 4.0.30319\r\n"},"status":500,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"url":"https://teams.microsoft.com/api/mt/jp/beta/users/connectors/19:[email protected];messageid=1541604731447/1541604731447/executeAction","data":{"inputParameters":[],"actionId":"bf7861fe-9714-4514-bacb-df560bcb82a8","potentialAction":"{\"@type\":\"HttpPOST\",\"@id\":\"bf7861fe-9714-4514-bacb-df560bcb82a8\",\"name\":\"Add comment\",\"target\":\"https://xxxxxxxxx.ngrok.io/comment\",\"headers\":[],\"body\":\"\",\"bodyContentType\":\"\"}","name":"action/connector","integrationId":"lu6xw8mk4k","meta":"{\"connectorSenderGuid\":\"203a1e2c-26cc-47ca-83ae-be98f960b6b2\",\"providerAccountUniqueId\":null,\"connectorConfigurationAlternateId\":\"3de8496598f2482bae4186726f5fc0cf\"}","clientInfo":{"locale":"ja-jp","country":"jp","platform":"Web","clientVersion":"1415/1.0.0.2018101638"}},"headers":{"X-Skypetoken":"pii","Authorization":"pii","Accept":"application/json, text/plain, */*","Content-Type":"application/json;charset=utf-8","X-RingOverride":"general","x-ms-scenario-id":"666","x-ms-user-type":"user","x-ms-client-type":"web","x-ms-client-env":"msteams-web-prod-asea-02","x-ms-client-version":"1415/1.0.0.2018101638","x-ms-session-id":"405f5e5b-f586-ed45-5753-64faa20c8247"},"counter":"ext_actionable_card_http_post","decrementNetworkRequests":null,"hostName":"teams.microsoft.com"},"statusText":""}

Document Details

âš  Do not edit this section. It is required for docs.microsoft.com âžź GitHub issue linking.

bug freemium-only teams-developer-support

All 37 comments

@ikosin - We are looking into this. Meanwhile, could you please confirm if you have enabled actions on your Connector cards in Connector Portal?

image

@Wajeed-msft - Thank you for your reply.
I did not know that each Connector has a setting to enable action.
However, the one I used for posting is not my own Connector, but the Incoming Webhook Connector which is written in "Setting up a custom incoming webhook".
The Incoming Webhook connector is not set to enable actions?

I thought it might be a problem with the environment of my account. I used "Microsoft Teams for Free" for development, but I upgraded to a paid "Office 365 Business Essentials". Then an HttpPOST request reached to the endpoint.

@Wajeed-msft Running into the same issue. Using the demo code, and trying to send any data through HttpPOST with the "Incoming webhook connector" on a Microsoft Teams for Free account - and only receiving errors. Not able to submit any http/https post requests so far.

image

And console error :

image

errorCode:InternalServerError,
message:Failed to execute AEA backend request ConnectorActionRequest

PS: Also weird that this issue doesn't come up in google searches. Was only able to find it by going through the closed comments on this article.

@Wajeed-msft Same thing here. We created now a "Office 365 Developer" account, and then incoming webhooks seem to be able to send HttpPOST requests.

So the question is if customers using the free account would be able to take advantage of MessageCard's with HttpPOST actions that come in through incoming webhooks?

Reopening.

We are investigating issue with HttpPost for Freemium user.

I'm also having the same issue - using the incoming web hook connector and trying to make an HttpPOST

the error I get is a little different:

2019-01-11T19:22:58.027Z Err [O365ActionPaneController.makeHttpPOSTRequestForConnector()] Http invoke failed: {"data":{"errorCode":"Unknown","message":"Object reference not set to an instance of an object."},"status":500,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"url":"https://teams.microsoft.com/api/mt/amer/beta/users/connectors/19:[email protected];messageid=15xxxxxx259/154xxxxxxx9/executeAction","data":{"inputParameters":[],"actionId":"e31907e8-xxx-xxx-xxx-85a65... 2019-01-11T19:22:58.027Z War HTTP request failed: POST "https://teams.microsoft.com/api/mt/amer/beta/users/connectors/19:[email protected];messageid=15472xxxxxxxx59/154xxxxxxx9/executeAction", status: 500, response: {"errorCode":"Unknown","message":"Object reference not set to an instance of an object."}, errorCode: Unknown, requestId: undefined, correlationId: undefined

@pauldfreeman - Are you also facing this only on Microsoft Teams Free account? For freemium users we have identified the issue and our team is working on fixing it. I'll update this thread once change is rolled out.

Hi

Yes - it was due to our accounts being inadvertantly set to being free accounts. We’ve reapplied our licensing and the issue looks to have gone away. So can confirm this was to do with it being a free account.

On 14 Jan 2019, at 11:25, Wajeed-msft notifications@github.com wrote:

@pauldfreeman https://github.com/pauldfreeman - Are you also facing this only on Microsoft Teams Free account? For freemium users we have identified the issue and our team is working on fixing it. I'll update this thread once change is rolled out.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/MicrosoftDocs/msteams-docs/issues/316#issuecomment-453973684, or mute the thread https://github.com/notifications/unsubscribe-auth/AS1sTMggu-lNCI5hmIyzItt12stvkr2Eks5vDGk7gaJpZM4YSsHN.

@Wajeed-msft closing the ticket - does that mean it was fixed now for free accounts?

We are still tracking this issue. This is still not fixed for Freemium account.

How is this not fixed yet? Right now we need to use a workaround with opening a webpage to do the action which is just stupid if teams offers the ability to do post request actions.

@finalgamer - Just to be sure, are you facing this for Microsof Teams Free user account?

@Wajeed-msft We are not using Microsoft Teams Free. We have subscriptions for Office 365 Business Premium and Office 365 Business Essentials.

This is the error I get when performing the post action.

2019-03-07T09:35:48.547Z [O365ActionPaneController.makeHttpPOSTRequestForConnector()] Http invoke failed: {"data":{"errorCode":"InternalServerError","message":"Failed to execute AEA backend request ConnectorActionRequest. Request Url: https://outlook.office.com/actions/7c14631a-xxxx-xxxx-xxxx-xxxxxxxxxxxx/executeAction/?culture=en-us, Request Method: POST, Response Status Code: InternalServerError, Response Headers: X-MSEdge-Ref: Ref A: 1BD83EEEB58149B5B87E359F797E7706 Ref B: AM3EDGE0315 Ref C: 2019-03-07T09:35:48Z\r\nDate: Thu, 07 Mar 2019 09:35:48 GMT\r\nX-AspNet-Version: 4.0.30319\r\n"},"status":500,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"url":"https://teams.microsoft.com/api/mt/emea/beta/users/connectors/19:a396e1863c…[email protected];messageid=xxxxxxxxxxxxx/xxxxxxxxxxxxx/executeAction","data":{"inputParameters":[{"id":"feedback","value":"asdf"}],"actionId":"f06e0fd8-xxxx-xxxx-xxxx-xxxxxxxxxxxx","potentialAction":"{\"@type\":\"HttpPOST\",\"@id\":\"f06e0fd8-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\"name\":\"Send Feedback\",\"target\":\"https://webhook.site/bbe50020-1390-419b-914c-1864a04f6981\",\"headers\":[],\"body\":\"\",\"bodyContentType\":\"\"}","name":"action/connector","integrationId":"u8xxxxxxxx","meta":"{\"connectorSenderGuid\":\"203a1e2c-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\"providerAccountUniqueId\":null,\"connectorConfigurationAlternateId\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}","clientInfo":{"locale":"en-us","country":"us","platform":"Web","clientVersion":"1415/1.0.0.2019022139"}},"headers":{"X-Skypetoken":"pii","Authorization":"pii","Accept":"application/json, text/plain, */*","Content-Type":"application/json;charset=utf-8","X-RingOverride":"general","x-ms-scenario-id":"2234","x-ms-user-type":"user","x-ms-client-type":"web","x-ms-client-env":"msteams-web-prod-ukso-02","x-ms-client-version":"1415/1.0.0.2019022139","x-ms-session-id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},"counter":"ext_actionable_card_http_post","decrementNetworkRequests":null,"hostName":"teams.microsoft.com"},"statusText":""}

I x'ed out some information I would not like to post publicly.

Request should have been sent to https://webhook.site/bbe50020-1390-419b-914c-1864a04f6981 which is a simple online request capture tool.

Action is taken from an example in the teams doc.

Could you please share your Connector id?

Is it one of these?

integrationId: "u8xiqgdofv"

"connectorSenderGuid":"203a1e2c-26cc-47ca-83ae-be98f960b6b2"

"connectorConfigurationAlternateId":"a67dd67ef9d44af58a7c05260916cf3f"

@finalgamer - Are you trying Incoming Webhook? Or Did you create your own Connector?
image

We are using Incoming Webhook

@finalgamer - Could you please share the email id of user who performed the action? If it's not a demo accout which you could share publicly then you could share it via email to us on our Developer Support alias.

@Wajeed-msft They were added by my account: michele.dellaneve (at) livesystems.ch

@finalgamer - Could you please try this again and provide latest failure details?

@Wajeed-msft - Hi, I'm also having the same issue - using the connector I registered ( and I added the Target url in the Actions URL of Connector Portal ) , and trying to make an HttpPOST .
my connector portal follows:
image

my json payload follows:
image

the error follows:
image

Can you give me some advice, thanks!

@XimenaWang - Are you trying this for Freemium user? This is still not supported for Freemium user.
If you are getting this for normal O365 tenant member, could you please share the email id of user who performed the action?

@Wajeed-msft If this is not officially supported for freemium users, please add a note or warning in the documentation, instead of having people run into this when following the documentation's test setup.

Because right now the documentation starts with "Any user can connect a team to services...", but only freemium users get these cryptic errors.

@mastef it _should_ work, but it doesn't. We are continuing to work with the team that owns that codepath to fix this.

@mastef - Hi, Teams can send post to my API successfully. I just replaced my previous logic with this simple code "hello world", and after clicking the button "acknowledge", I got this message "Hello World". So the post of Teams works, just can't execute my API previous function through Teams, may be a permission issue. You can have a try to send the message only in the API. Hope it helps.

my API simple code:
image

the success Post:
image

my json payload:
image

@Wajeed-msft . I am facing the same issue and unable to perform httppost action from message card. need help !

@iabukai - Are you facing this issue for non Freemium user? Also, HTTP post action work only in the same tenant where Connector is registered unless it's approved and published in App Store.

I am a non freemium user and having this issue as well. It doesn't matter what domain I use. Having to Publish it first is counter productive since I don't want to publish until I know it actually works. Can we get some clear communication and documentation as to how this is actually supposed to work because clearly what is there is wrong.

Same +1

Hi ,
I have an internal API that I’m making available through my prod server. Now I want to call that API from a MessageCard HTTPPost action in Teams. When I click on the action button I do not see any errors, and Fiddler shows me a 200 response and I can see the token in the authorization header and the below in the body:{"status":"Completed","actionId":"7e3b1ab6-3320-4f11-92e3-8db3909dcb1f","performedAt":"2020-07-29T04:38:11.5903214Z","properties":{"displayMessage":""}}
But nothing happens after that on the Teams (im expecting an rely commnet).

Can you please share the card JSON which we can use.
As per some docs i have tried keeping headers={
“content-type”:”application/json;charset=UTF-8″,
“CARD-UPDATE-IN-BODY”: true,
“CARD-ACTION-STATUS”: "has been Approved”
}

I'm also encountering the issue and supposing that come from timeout error.
It always happen when working heavy process at server side.

Is there any clear documentation on what is and isn't allowed? I'm using a free version of Teams and am running into this issue with incoming webhook. I would like to allow the user to enter text on the card, submit, then post that text back out to a 3rd party system. I consistently get Could not complete the requested action. Please try again later.
Is there a bug, is this not allowed for Free accounts, or are non-marketplace webhooks unable to post back to external services?

@taylor-clark I have the same question. We have a business account and it doesn't work as advertised for us either. Either their documentation is flat out wrong or it is just broken. They haven't replied in months on this issue. This an other reasons is why we ditched Teams and moved to slack.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DamienDoumer picture DamienDoumer  Â·  7Comments

kafka-yu picture kafka-yu  Â·  5Comments

krishnajaju picture krishnajaju  Â·  6Comments

camiloxs picture camiloxs  Â·  6Comments

oyvindam picture oyvindam  Â·  5Comments