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://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http