An Azure Virtual Machine (VM) is configured with a system-assigned managed identity. The VM tries to retrieve a secret from an Azure Key Vault. What is the expected behavior if the VM's managed identity has been granted the correct access policy in the Key Vault?
Think about how system-assigned managed identities simplify authentication without credentials.
System-assigned managed identities allow Azure resources like VMs to authenticate to services such as Key Vault without needing credentials. If the VM's managed identity has the correct access policy, it can retrieve secrets securely.
You want multiple Azure resources (like VMs and App Services) to authenticate to Azure SQL Database using the same managed identity. Which managed identity type supports this scenario?
Consider which identity type is reusable across resources.
User-assigned managed identities are created independently and can be assigned to multiple Azure resources, allowing them to share the same identity for authentication.
Why is using managed identities considered more secure than embedding credentials like passwords or keys directly in application code or configuration files?
Think about how credentials are handled and risks of exposure.
Managed identities provide tokens dynamically and do not require storing credentials anywhere, which reduces the risk of accidental exposure or theft of secrets.
You have created a user-assigned managed identity named myIdentity in resource group myRG. Which Azure CLI command correctly assigns this identity to an existing VM named myVM in the same resource group?
Check the required format for the --identities parameter.
The --identities parameter requires the full resource ID of the user-assigned managed identity when assigning it to a VM.
Consider how tokens are issued and managed for system-assigned versus user-assigned managed identities. What is the key difference in their lifecycle and management?
Think about how the identity's existence relates to the resource it is assigned to.
System-assigned managed identities are created and deleted with the resource, while user-assigned identities are independent resources that can be assigned to multiple resources and persist beyond any single resource's lifecycle.