nerdexam
Microsoft

AZ-204 · Question #533

You are developing an ASP.NET Core app hosted in Azure App Service. The app requires custom claims to be returned from Microsoft Entra ID for user authorization. The claims must be removed when the…

The correct answer is E. Add the roles to the appRoles attribute in the app manifest. https://learn.microsoft.com/en-us/entra/identity-platform/howto-add-app-roles-in-apps#app-roles-

Submitted by kev92· Mar 30, 2026Implement Azure security

Question

You are developing an ASP.NET Core app hosted in Azure App Service. The app requires custom claims to be returned from Microsoft Entra ID for user authorization. The claims must be removed when the app registration is removed. You need to include the custom claims in the user access token. What should you do?

Options

  • ARequire the https://graph.microsoft.com/.default scope during authentication.
  • BConfigure the app to use the OAuth 2.0 authorization code flow.
  • CImplement custom middleware to retrieve role information from Azure AD.
  • DAdd the groups to the groupMembershipClaims attribute in the app manifest.
  • EAdd the roles to the appRoles attribute in the app manifest.

How the community answered

(54 responses)
  • A
    9% (5)
  • B
    4% (2)
  • C
    2% (1)
  • D
    6% (3)
  • E
    80% (43)

Explanation

https://learn.microsoft.com/en-us/entra/identity-platform/howto-add-app-roles-in-apps#app-roles-

Topics

#app manifest#appRoles#custom claims#Entra ID token

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice