How to develop an MS teams bot with oauth app using graph api
I have setup a small App Registration to work with the Graph API along side MS Teams. It uses the oauth flow to receive an access code, which I then can exchange for a token. I am successfully able to exchange the token for a "bot" token but then receive an error when attempting to send a message to a specific ms teams channel. I have tried the following endpoints using my service url:
- constructing a conversation reference and sending a request to the
v3/conversations/{conversation_id}
endpoint but receive{"message":"Authorization has been denied for this request."}
- constructing a new activity and sending a request to
v3/conversations/{conversation_id}/activities
but receive{"message":"Authorization has been denied for this request."}
- attempting to create a new conversation first, also receiving the same error message
I have also added an app to my teams instance and into that channel. I have also inspected the JWT token which includes the necessary TeamWork.Migrate.All
. My app also includes numerous application permissions which appear in the JWT. I'm looking for any guidance on what might be missing.