Reply To: Retrieving additional fields/claims from Azure AD


Hello Sam,

Thank you for choosing QuickApp for your project and thank you for your purchase!

Please follow the below steps to add your additional fields from Azure AD

  1. In Azure AD, ensure your extra claims are included in the idToken. See this Azure post on how to do that: Provide optional claims to Azure AD apps – Microsoft Learn
  2. In QuickApp, in the “ProfileService.cs” file add the below lines to the method GetProfileDataAsync. This will add your Azure AD claims to the accessToken and your Azure claims will be accessible from code:
    List azureADClaims = context.Subject.Claims
    .Where(c => c.Type == "Your_AzureAD_Claim1" || c.Type == "Your_AzureAD_Claim2").ToList();

Hope this helps