Microsoft DevOps Engineer Expert AZ-400 Practice Question
You are standardizing Azure DevOps pipelines that run on Microsoft-hosted agents. The jobs must deploy to Azure subscriptions in the same Microsoft Entra ID (Azure AD) tenant, but you want to eliminate any stored client secrets or certificates in the project. Pipelines should obtain an identity automatically at run time while still allowing you to scope permissions granularly at the resource-group level. Which approach meets the requirements with the least operational overhead?
Create a service principal, generate a client secret, and store the secret in an Azure DevOps variable group referenced by each pipeline.
Create an Azure AD application and service principal, add a federated credential that trusts the Azure DevOps organization, and configure an Azure Resource Manager service connection that uses workload identity federation.
Use an Azure DevOps personal access token (PAT) in the service connection and grant the PAT access to the target subscription.
Enable a system-assigned managed identity on each Microsoft-hosted agent and reference it from Azure CLI tasks in the pipeline.
Workload identity federation lets an Azure AD application (service principal) trust the JSON Web Token (JWT) issued to each Azure DevOps job. Because the token exchange is based on OpenID Connect, no client secret or certificate is stored in Azure DevOps. The service principal created for the subscription can be restricted to the required resource groups. Managed identities cannot be used by Microsoft-hosted agents, and storing a client secret or personal access token keeps a long-lived secret that contradicts the requirement to remove stored credentials.
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 workload identity federation in Azure?
Open an interactive chat with Bash
What is OpenID Connect (OIDC) and how does it relate to Azure DevOps?
Open an interactive chat with Bash
Why are managed identities not usable with Microsoft-hosted agents?
Open an interactive chat with Bash
What is Azure AD workload identity federation?
Open an interactive chat with Bash
Why can't managed identities be used with Microsoft-hosted agents?
Open an interactive chat with Bash
How does OpenID Connect (OIDC) facilitate secure token exchange in Azure DevOps pipelines?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Develop a security and compliance plan
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 .