If a user is assigned roles, then these will be part of the ID Token. You will need to create some mapping in the Firebase DB but to be honest I don't think you need this as the roles will always be part of the ID Token. Any reason why you need to persist them?
I think the problem here is with Firebase and not Azure AD... You can certainly reach out to our dev support team to get some assistance aka.ms/425Show/help
Thanks @christosmatskas for the response. Yeah you right the problem is with the Firebase. I didn't find a reliable solution yet. you can get the user app role with the MS graph API using OAuth token.
If a user is assigned roles, then these will be part of the ID Token. You will need to create some mapping in the Firebase DB but to be honest I don't think you need this as the roles will always be part of the ID Token. Any reason why you need to persist them?
Yes we are getting the roles in ID Token but only when user sign-in otherwise ID Token isn't included in authstatuschanged or I'm missing something?
Hi!
Did you manage to solve this problem?
We ran into exactly the same problem today and haven't been able to find a solution yet.
I think the problem here is with Firebase and not Azure AD... You can certainly reach out to our dev support team to get some assistance aka.ms/425Show/help
Thanks @christosmatskas for the response. Yeah you right the problem is with the Firebase. I didn't find a reliable solution yet. you can get the user app role with the MS graph API using OAuth token.
stackoverflow.com/questions/635008...
docs.microsoft.com/en-us/graph/api...
https://docs.microsoft.com/en-us/graph/api/group-list-approleassignments?view=graph-rest-1.0&tabs=http
If anyone found a reliable solution share with us :) Thanks!