Microsoft Azure Developer Associate AZ-204 Practice Question
You register a single-tenant web API named ContosoApi in Microsoft Entra ID. A separate daemon application will call the API by using the client-credentials grant. The API must authorize calls only when the incoming access token contains the role Orders.ReadWrite and there is no user context. Which configuration should you perform for ContosoApi in the Azure portal?
Create an application role named Orders.ReadWrite in ContosoApi and assign that role to the client application's service principal.
Define a delegated permission scope named Orders.ReadWrite in ContosoApi and require admin consent for the client application.
Create an Azure RBAC role assignment granting the client application Contributor access to the ContosoApi App Service.
Add optional JWT claims for roles in ContosoApi and mark the claim as essential.
Because the client application authenticates with the client-credentials flow, the access token will not contain user delegated scopes. Instead, the token can carry application roles that are granted to the calling service principal. Defining an application role in ContosoApi's app registration and assigning that role to the client application causes Entra ID to issue a roles claim (Orders.ReadWrite) in every token that the client obtains, regardless of user context. Defining delegated scopes would only work in flows that involve a user, optional claims do not create or control role issuance, and Azure RBAC on the App Service is unrelated to token claims used by a custom API.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a client-credentials grant in Microsoft Entra ID?
Open an interactive chat with Bash
What is the difference between application roles and delegated permissions in Azure?
Open an interactive chat with Bash
How do roles in the JWT claim affect authorization for a web API in Azure?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Implement Azure security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .