Hello.
I'm trying to create a simple "bot" (not a bot app though) using a outgoing webhook from Teams :
- in Flow, I created a flow with a HTTP Request trigger - from which I got an HTTP POST URL
- This URL contains several arguments, including a sig - which I understand is like a signature or authentication.
- I use this URL in the Teams outgoing webhook. Teams generates a token during the configuration.
- In Teams, if I invoke the webhook (@webhookname), the flow is not triggered.
Checking using ngrok, I captured the query. Teams is sending a authentication HMAC header :
authentication: HMAC quqfKGei8NqG3gvYZMb..........MH/0=
Using Postman, the query returns :
{ "error": { "code": "DirectApiAuthorizationRequired", "message": "The request must be authenticated only by Shared Access scheme." } }
When i remove this authentication header in Postman, the trigger is executed properly.
How should I configure either Teams or my Flow HTTP trigger so that both can communicate ?
What should I do with the token generated in Teams ?
Thanks for your help !
HI @LaurentLee,
Could you share a screenshot of your flow?
Have you created a custom connector from Postman?
Hope this doc on Create a custom connector from a Postman collection could be a reference for you:
https://docs.microsoft.com/en-us/connectors/custom-connectors/define-postman-collection
About creating an outgoing webhook in Microsoft teams, please check it at here for more details:
https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/outgoingwebhook
Best regards,
Mabel Mao
Hello @v-yamao-msft.
I don't think I need a postman collection or similar. I used Postman to send and simulate a call from Teams, using the call captured by ngrok.
Here is the flow i used.
The HTTP Request trigger generated a URL that I used subsequently in the Teams outgoing webhook.
My point is that it seems that Teams is including an authentication value in the header, which seems to be not handled by Flow (the trigger is never triggered).
When i remove this authentication HMAC header in Postman, the trigger is fine and the response action is run as well.
Hi
Did you ever get this to work... I am also not able to trigger the flow...
BR
/Johan
Our company moved to Slack... 😞
I never really understood the authentication process for the webhook.
http://www.wictorwilen.se/creating-a-bot-for-microsoft-teams-using-microsoft-flow
This solution uses Azure Functions to receive the outgoing webhook message, authenticate it, then send to the HTTP Trigger in Flow.
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
16 |
User | Count |
---|---|
137 | |
49 | |
42 | |
36 | |
28 |