I try to send a message to Microsoft Teams with the graph api and a non-personal ClientApplication token.
It is currently no problem to get the token from Azure by clientId / secret / tenantId. The token seems to work as well, so I'm able to get e.g. the list of all azur users by rest api. But when I try to send a message to Teams with this token (POST https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages), the result is { "error": { "code": "Unauthorized", "message": "Unauthorized", "innerError": { "date": "...", "request-id": "..." } } }
The same call works fine with my personal bearer token.
Any idea how to enable the clientapp to post to teams?