Courseiva
Manage identity and access →mediumMultiple Choice

AZ-500 Manage identity and access Practice Question

An application hosted on an Azure VM needs to read secrets from Key Vault without storing credentials. Which identity pattern should be used?

⚠ Common exam trap

Watch out — candidates often confuse managed identities with other credential-based patterns (like client secrets or SAS tokens) and fail to recognize that the question explicitly requires 'without storing credentials,' which only a managed identity satisfies.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

System-assigned managed identity with Key Vault access granted by RBAC or access policy

A system-assigned managed identity enables an Azure VM to authenticate to Azure Key Vault without storing any credentials in code or configuration. Azure automatically creates a service principal for the VM in Microsoft Entra ID, and the VM can obtain an access token from the Azure Instance Metadata Service (IMDS) endpoint (169.254.169.254) to authenticate to Key Vault. Access to secrets is then controlled by assigning RBAC roles (e.g., Key Vault Secrets User) or configuring a Key Vault access policy for that identity, eliminating the need for any stored secrets.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    System-assigned managed identity with Key Vault access granted by RBAC or access policy

    Why this is correct

    A system-assigned managed identity is the correct choice because Azure automatically provisions a service principal for the VM, and the application can obtain an Microsoft Entra ID token through the instance metadata service (IMDS) without storing any credentials in code or configuration. Key Vault access is then granted to that identity via either Azure RBAC (for example, the Key Vault Secrets User role) or a legacy vault access policy, enabling the VM to read secrets securely and with automatic credential rotation managed by Azure.

  • ✗

    Client secret stored in appsettings.json

    Why it's wrong here

    Storing a client secret in appsettings.json is insecure because the secret exists as plaintext on the filesystem and can easily leak through source control commits, backup copies, or log output. It also fails to leverage Microsoft Entra ID managed identity, forcing you to manually manage and rotate the secret throughout its lifecycle. While it may technically work to authenticate, it is not a direct or secure way to meet the requirement of reading secrets from Key Vault on an Azure VM.

  • ✗

    Shared access signature stored as an environment variable

    Why it's wrong here

    A shared access signature (SAS) is a storage-level delegation token, not a mechanism for authenticating to Key Vault, so it does not address the requirement of reading Key Vault secrets. Even if the SAS itself were used to access some other secret store, placing it in an environment variable leaves a static credential exposed to any process or user with access to the VM's runtime environment. This approach neither integrates with Microsoft Entra ID identity nor provides the least-privilege, managed-credential benefits of a managed identity.

  • ✗

    A user account excluded from MFA

    Why it's wrong here

    Using a user account excluded from MFA is inappropriate for an automated VM workload because user principals require interactive or delegated Microsoft Entra ID authentication, not a seamless workload identity. Excluding the account from MFA actively weakens the tenant's security posture and violates conditional access baseline policies. A managed identity is the correct workload identity; a user account, especially one with MFA bypassed, introduces unnecessary human-related risk and does not directly meet the stated requirement.

Quick reference

Access Control Model Comparison

ModelAcronymWho Controls Access?Best For
Discretionary Access ControlDACResource ownerSmall teams, file shares
Mandatory Access ControlMACSystem / security labelsClassified govt / military
Role-Based Access ControlRBACAdministrator (via roles)Enterprise environments
Attribute-Based Access ControlABACPolicy engine (user + resource attributes)Fine-grained, dynamic policies
Rule-Based Access ControlRuBACSystem rules / ACLsFirewall rules, network ACLs

About these practice questions

One of 617 original AZ-500 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-500 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-500 exam.