Azure B2C groups in claims

Petr Kasnal 26 Reputation points
2023-01-12T14:24:24.1133333+00:00

Hi, i need take from my JWT token groups on sign in which have user. I don't find any solution in B2C is there any way? I create app in .NET MVC

Thank you

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,664 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 22,086 Reputation points Microsoft Employee
    2023-01-12T22:27:28.5733333+00:00

    Hi @Petr Kasnal , are you asking on how to retrieve the groups that the current user is in? I would use the Graph API for this.

    https://graph.microsoft.com/v1.0/me/memberOf
    
    

    You can take the user from the JWT and then run the Graph query on that user. Please let me know if you have any questions!

    If this answer helped you please mark it as "Verified" so other users can reference it.

    Thank you,

    James