Microsoft Azure Developer Associate AZ-204 Practice Question
You are developing a .NET 6 console application that runs unattended as a scheduled job. The job must call Microsoft Graph to create user accounts. The app registration has a client secret and the User.ReadWrite.All application permission with admin consent. Which MSAL.NET call should you use to obtain the access token from an IConfidentialClientApplication instance?
Because the application runs without user interaction and uses an application permission granted by an administrator, it must authenticate with the OAuth 2.0 client-credentials grant. In MSAL.NET you start this flow with AcquireTokenForClient(scopes) and then call ExecuteAsync to perform the request. The other builder methods initiate flows that rely on a user identity: AcquireTokenInteractive launches an interactive sign-in UI, AcquireTokenWithDeviceCode prompts for a device code, and AcquireTokenByIntegratedWindowsAuth uses Windows credentials-none of which are suitable for a headless daemon using application permissions.
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 MSAL.NET library used for?
Open an interactive chat with Bash
What is the OAuth 2.0 client-credentials grant?
Open an interactive chat with Bash
Why is AcquireTokenForClient(scopes).ExecuteAsync() used in this scenario?
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 .