Try the above API call in delegated permission scenario which will work. If you try with application permission scenario, then it's not supported. Here's the documentation for it.
How can I send a message to a specific channel?
Alexander Baumgartner | budoland
1
Reputation point
array(1) {
["error"]=>
array(3) {
["code"]=>
string(12) "Unauthorized"
["message"]=>
string(12) "Unauthorized"
["innerError"]=>
array(3) {
["date"]=>
string(19) "2021-06-30T09:58:22"
["request-id"]=>
string(36) "6f7eae28-fefe-43a5-a5cf-51f6eb396ae9"
["client-request-id"]=>
string(36) "6f7eae28-fefe-43a5-a5cf-51f6eb396ae9"
}
}
}
2 answers
Sort by: Most helpful
-
-
Alexander Baumgartner | budoland 1 Reputation point
2021-07-07T10:16:47.157+00:00 Your answer is not correct. Please see https://learn.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0&tabs=http
Kind regards,
Alex