My scenario is similar (probably duplicated with How to include roles in issued token when using multi-tenant Azure AD with Azure AD B2C?) Even though I still have to open this question, I can not successfully apply the answer of the origin question and don't know how to contact the author. So this is my case:
- I set up sign-in for multi-tenant Azure Active Directory using custom policies in Azure Active Directory B2C and with a Google account
- I'm able to create my custom roles by editing the Manifest of the app. The App's manifest
- I'm able to add users and assign roles to them Add user Assign role
- Now what I want is to return the roles object within the issued token, something like this
{ ... "roles": [ "role1", "role2" ], ... }
but currently, after following the instruction of the answer of the original question, the token is unchanged and the "roles" object is not found. Currently
What I've tried:
- As I mentioned earlier, I followed the instruction of the original question, updated the XML files, and updated them in the Identity Exp Framework, but still failed.
- I tried to grant the application as higher permission as possible but still failed.
- Searched around for more questions/answers like this but there are none.
- Even in the document, MS confirms that "Roles are not supported with consumer accounts", but somehow, in the original question, there is a solution to retrieve the roles in the issued token.