Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Microsoft Teams Graph Spoke - Client Credentials flow failing with AADSTS70011 / AADSTS1002012

Release: Australia
vadlasnow
Tera Contributor

Hi Team,
I'm configuring the Microsoft Teams Graph Spoke and using Client Credentials as the OAuth grant type.
Initially, token generation failed with:
AADSTS1002012: Client credential flows must have a scope value with /.default suffixed to the resource identifier.

Based on a ServiceNow KB, I created an OAuth Entity Scope:
Name: Default
OAuth Scope: .default
and associated it with the default OAuth Entity Profile for the Microsoft Teams Graph OAuth Provider.
After doing so, the error changed to:
AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid.
The token request appears to be sending the following scopes:
AdministrativeUnit.ReadWrite.All, Chat.Read, User.Read, AccessReview.ReadWrite.Membership, User.ReadBasic.All, Chat.ReadWrite, TeamsAppInstallation.ReadWriteForUser, Mail.Send, openid, AccessReview.ReadWrite.All, Directory.ReadWrite.All, Directory.AccessAsUser.All, Group.Read.All, offline_access, User.ReadWrite.All, .default, User.ReadWrite, Directory.Read.All, Group.ReadWrite.All
while Azure expects:
https://graph.microsoft.com/.default

The Azure App Registration already has the required Microsoft Graph Application permissions configured and admin consent granted.

My questions are:
-For the Microsoft Teams Graph Spoke, should the Client Credentials profile be associated only with the ".default" scope?
-Do the existing delegated scopes (User.Read, openid, offline_access, Chat.Read, etc.) need to be removed from the OAuth Entity Profile?
-Is there an additional configuration required in the Teams Graph Spoke to generate a token request using https://graph.microsoft.com/.default rather than individual scopes?

Any guidance or examples of a working Teams Graph Spoke Client Credentials configuration would be appreciated.
Thanks.

0 REPLIES 0