Aug 09 2022 02:06 AM
I created a AAD tenant for my user.
And I use the client-credentials-provider to pass through the authorization.
But when I tried to call the send messgae API it showed the error message below.
409Graph service exception Error code: Unauthorized
409Error 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-message... for more details.
I am wondering whether its unavailable to send messgae through client-credentials-provider ?
Because I wanna send the message by my application without oauth2.0 follow, is there any way to realize that?
Aug 09 2022 04:56 AM
Aug 10 2022 03:05 AM
@lobbs - Could you please confirm the below asks?
Aug 11 2022 06:34 PM
->When I execute my code to call the send message API
->Yes,I am using the application permissions
By the way , as I confirmed with the other guys, they said the send channel message API only could be used by content import mode..so which means it is not supportted for normal use .
Aug 12 2022 10:47 AM - edited Aug 12 2022 10:48 AM
@lobbs - We tried https://docs.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-m... example and our API call was successful.
Please check this document Send chatMessage in a channel or a chat - Microsoft Graph v1.0 | Microsoft Docs, if you want to send messages to a normal channel.
Could you please confirm what do you mean by client-credentials-provider?