Thank you for time and patience while posting your query on Microsoft Q&A. From above description I could understand that you are looking for way to get application Roles assigned to user in the oauth tokens as claims.
Please do correct me if this is not the case by responding in the comments section:
This could be achieved by as per Add app roles to your application and receive them in the token, also a similar request has been answered here:
To extract roles of user you need to have them configured as per : Add app roles to your application and receive them in the token.
- Ensure that application have Implicit and hybrid grants flow enabled:

- The endpoint must be hitting organization endpoint and not common/personal, as they would not emit the roles. Given is the example
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize?
client_id={Application ID}
&response_type=code&id_token
&redirect_uri=http://localhost/myapp/
&response_mode=query
&scope=openid&https://graph.microsoft.com/mail.read
&state=12345
&nonce=abcde
- Extract the code from request you sent above:

- The id_token will contain the user app roles assigned to the guest user and endpoint with tenant id:

Thanks,
Akshay Kaushik
Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.