Microsoft Azure Developer Associate AZ-204 Practice Question
You are building a console application that runs as a background service and must call a custom web API secured by Microsoft Entra ID. The API exposes a scope named "Tasks.Read". The console app must obtain an access token without any user interaction. What should you configure to enable the console app to receive a valid token for the API?
Expose "Tasks.Read" only as a delegated permission, require users to grant consent individually, and obtain the token through the authorization code flow.
Add the console app's managed identity to an Azure AD group that is assigned the "Tasks.Read" scope and rely on group claims in the token.
Register the console app as a public client, configure implicit grant, and request an access token directly from the authorization endpoint.
Create an application permission for "Tasks.Read", assign that permission to the console app, grant tenant-wide admin consent, and request the token by using the OAuth 2.0 client credentials flow.
Because the console application runs without a signed-in user, it must authenticate as an application (daemon). The web API therefore needs an application permission that represents the Tasks.Read operation. After you expose this application permission, you assign it to the console app registration and grant tenant-wide admin consent. The console app can then use the OAuth 2.0 client credentials flow to request a token whose audience is the API. Delegated permissions, implicit grant, or public-client settings rely on a user context and are not suitable. Adding the managed identity to a group does not satisfy the permission/consent requirements for Azure AD tokens.
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 the OAuth 2.0 client credentials flow?
Open an interactive chat with Bash
What are application permissions and how are they different from delegated permissions?
Open an interactive chat with Bash
What is tenant-wide admin consent in Microsoft Entra ID?
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 .