Microsoft Azure Developer Associate AZ-204 Practice Question
An Azure virtual machine uses a user-assigned managed identity to run a PowerShell script that retrieves and completes messages from an Azure Service Bus queue. The script authenticates with DefaultAzureCredential and calls the receiveMessages API. Which Azure built-in role should you assign to the managed identity on the Service Bus namespace to follow the principle of least privilege?
The Azure Service Bus Data Receiver role grants permissions to peek, receive, and complete messages on queues and topics, which is exactly what the script requires. Azure Service Bus Data Owner also works but provides full management rights that exceed least-privilege guidance. Azure Service Bus Data Sender can only send messages, and Service Bus Resource Contributor is not a valid built-in role for data operations, so these do not resolve the unauthorized error.
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 Azure Service Bus Data Receiver role?
Open an interactive chat with Bash
How does DefaultAzureCredential work in authenticating to Azure resources?
Open an interactive chat with Bash
What is the principle of least privilege and why is it important 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 .