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 Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.