Azure B2C groups in claims

Petr Kasnal 21 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

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,677 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 11,796 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