- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 04:16 AM
Hi!
am trying to send message to Teams Channel using Microsoft Graph API "/channels/{channel-id}/messages".
https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http
I have made Application in Azure portal and added "ChannelMessage.Send" permissions.(Delegated)
The connection is succeeded but I cannot fix 401 Error bellow.
Status Code : 401
Response Body :
{"error":{"code":"Unauthorized","message":"Message POST is allowed in application-only context only for import purposes. Refer to https://docs.microsoft.com/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams for more details.","innerError":{"date":"2024-07-25T11:07:26","request-id":"my-requestid","client-request-id":"my-clientrequestid"}}}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2024 10:05 PM
Solved by changing Grant type "Client Credentials" to "Authorization Code"!
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2024 10:05 PM
Solved by changing Grant type "Client Credentials" to "Authorization Code"!
Thank you.