Azure application & graphapi scope

Steven-6130 46 Reputation points
2021-11-01T08:10:20.64+00:00

Hi, I have an application xxx-client and a custom application scope defined as xxx-app. ![145319-image.png][2] By defining the scope xxx-app in the [v2-oauth2-auth-code-flow][1], I am able to fetch the custom roles claim like 'Role.Reader'. { "typ": "JWT", "alg": "RS256", "kid": "l3sQ-50cCH4xBVZLHTGwnSR7680" }.{ "roles": [ "Role.Reader", "Role.Writer" ], "scp": "xxx", .... "ver": "2.0" }.[Signature] When I define multiple scopes. like (User.Read, api://xxxxApp/xxxx) or (api://xxxxApp/xxxx, User.Read) I got the graph api claims or the roles claims (depends of the scope orders) but not both of the claims. { "typ": "JWT", "nonce": "xxxxx", "alg": "RS256", "x5t": "xxx", "kid": "xxxx" }.{ "scp": "email openid profile User.Read User.ReadBasic.All", "signin_state": [ "dvc_mngd", "dvc_dmjd", "kmsi" ], ..... }.[Signature] Is it possible to get App roles and graph api claims in a single oauth2 code flow ? [1]: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow [2]: /api/attachments/145319-image.png?platform=QnA

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
207 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,591 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,877 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,471 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,306 Reputation points
    2021-11-01T14:44:55.507+00:00

    Hi anonymous user • Thank you for reaching out.

    Unfortunately, Azure AD doesn't support multiple audiences claim as of now. Which means, you can either specify Graph API scopes or your custom API scopes in a given authentication request.

    At this time, we view unbound multi-audience tokens as a security threat that we do not support. Multi-audience bearer tokens can be replayed from one audience to the other insecurely, allowing an attacker who compromises one service to expand their footprint unnecessarily.

    Our product team is investigating on proof of possession scheme, to securely support multi-audience tokens that are sender constrained. Hopefully, this will be supported in near future.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful