question

ArkaDutta-6370 avatar image
0 Votes"
ArkaDutta-6370 asked CarlZhao-MSFT edited

graph rest api to send a message to a teams channel failing

Request =>


curl --location --request POST 'https://graph.microsoft.com/v1.0/teams/{teamId}/channels/{channelId}/messages' \
--header 'Authorization: Bearer <bearer_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"body": {
"content": "Dude !!! Please work"
}
}'

Response =>

{
"error": {
"code": "InternalServerError",
"message": "Unable to find target address",
"innerError": {
"date": "2021-09-27T18:23:48",
"request-id": "2edd2854-1edc-47b8-aa1b-52e8e252f767",
"client-request-id": "2edd2854-1edc-47b8-aa1b-52e8e252f767"
}
}
}

teamId and channelId s are fetched from the graph API itself for the same.

What am I doing wrong here. Have followed as per this blog => https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http

microsoft-graph-applications
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered CarlZhao-MSFT edited

This is an error caused by your personal account. Personal microsoft account is not currently supported. You need to switch to a work/school account.

135619-image.png

135724-image.png



If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




image.png (17.2 KiB)
image.png (66.8 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @ArkaDutta-6370 Would you please provide us with an update on the status of your issue?

0 Votes 0 ·