Hello @Amaaz Arshad,
Thank you for posting your query on Microsoft Q&A.
Based on your description, it seems you are looking to include the Company Name claim field in the /.auth/me
endpoint within the token.
To add this claim to the token, you need to configure optional claims for the registered application in Entra ID. Please follow the steps below to pass the claim in the /.auth/me
endpoint:
- Navigate to Microsoft Entra ID > Enterprise Applications and search for the application linked to your web app in Azure App Service.
- Open the application, then go to the Single Sign-On blade.
- Click Edit under the Attributes & Claims section.
- Click Add New Claim and, under Source Attribute, select User.CompanyName, then click Save.
This configuration will allow the Company Name attribute to be included in the token when a logged-in user requests it.
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Thanks,
Raja Pothuraju.