When I attempt to use teams beta endpoints such as
https://graph.microsoft.com/beta/teams/{group-id}
with application only access I receive the error:
{
"error": {
"code": "InvalidRequest",
"message": "Calling this API using MSGraph Application Permissions is not supported.",
"innerError": {
"request-id": "32ea3e82-d0c5-42ce-9e94-b215bf255a0a",
"date": "2018-08-20T20:52:12"
}
}
}
These endpoints work fine with user delegated permissions. Is this type of access truly not supported, or am I missing something in the request? My end goal is to query teams channel messages without user interaction.
Updating with additional details on getting token and other endpoints:
I am getting consent with
https://login.microsoftonline.com/{tenant}/adminconsent
, then getting the token with https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
. I am using the Client Credentials grant type.
If I try to navigate deeper into the teams endpoint (e.g. channels or messages), I get:
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "953fd07b-6e4e-4ce2-bd97-92a9eaa676bf",
"date": "2018-08-22T13:37:08"
}
}
}
I also tried https://graph.microsoft.com/beta/groups/{group-id}/
, which returns expected results, but https://graph.microsoft.com/beta/groups/{group-id}/team
returns the Calling this API using MSGraph Application Permissions is not supported
error.