Programmatically create inbound webhook to Teams Channel?

Vikram_162 0 Reputation points
2024-07-08T13:26:55.7933333+00:00

I want my application to be able to post messages/notifications into external Teams channels.

So far I've only found the manual way to do this- making the user generate an incoming webhook URL through their personal Teams app. They would then have to submit the signed URL to our website/application so we can use it for future notifications

This is a poor and confusing user experience.

I know slack allows programmatic webhook generation based on documentation here:

https://api.slack.com/authentication/oauth-v2

https://api.slack.com/legacy/oauth#flow

Is there something I'm missing in the Microsoft Graph API docs? Maybe if I have a way for the user to sign in and grant temporary credentials/a bearer token to our website/application, I could then use the temporary permissions to call an API to create this same webhook and save it for future use? Or have the granted permissions stay permanent, and use a Graph API call to post messages in designated channels moving forward?

As of last year according to this stack overflow reply, programmatic creation of webhooks doesn't seem to be supported: https://stackoverflow.com/questions/76718712/is-there-a-way-to-have-zero-touch-install-for-ms-teams-connectors-into-channel

Is it possible to add this as a thing to work on, given that it would make Teams integrations so much smoother?

Other options I looked into:

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,541 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,328 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,027 questions
{count} votes