'How can I get user's group memberships included in the id token

I have an application that can successfully authenticate users through a B2C user flow policy and get an ID token in a JWT.

How can I update the user flow policy, so I get the user’s group membership as part of the ID token?

A link to documentation or concept would be a great help.



Solution 1:[1]

This is the older link.

Basically, add the groups in Azure AD and extract them via Graph API.

There is also a sample.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rbrayb