A managed identity is a special account created and managed by Azure to let services securely access other resources without needing to store credentials.
Click to reveal answer
beginner
How does a managed identity improve security?
It removes the need to store passwords or keys in code or configuration, reducing the risk of leaks or theft.
Click to reveal answer
intermediate
What are the two types of managed identities in Azure?
System-assigned managed identity (tied to one resource) and user-assigned managed identity (can be shared across resources).
Click to reveal answer
intermediate
How does a system-assigned managed identity lifecycle work?
It is created with the resource and deleted automatically when the resource is deleted.
Click to reveal answer
intermediate
Can a user-assigned managed identity be used by multiple resources?
Yes, it can be assigned to multiple resources, allowing shared access to other services.
Click to reveal answer
What does a managed identity eliminate the need for?
ASetting up firewalls
BUsing virtual machines
CCreating resource groups
DStoring credentials in code
✗ Incorrect
Managed identities let services authenticate without storing credentials in code or config.
Which managed identity type is tied to a single Azure resource?
AUser-assigned
BSystem-assigned
CGroup-assigned
DTenant-assigned
✗ Incorrect
System-assigned managed identities are created with and tied to one resource.
Can a user-assigned managed identity be shared across multiple resources?
AYes, it can be shared
BNo, only one resource can use it
COnly if resources are in the same region
DOnly for virtual machines
✗ Incorrect
User-assigned managed identities can be assigned to multiple resources.
What happens to a system-assigned managed identity when its resource is deleted?
AIt is deleted automatically
BIt remains active
CIt must be deleted manually
DIt is transferred to another resource
✗ Incorrect
System-assigned managed identities are deleted automatically with their resource.
Which Azure service feature uses managed identities to access other resources securely?
AAzure Monitor
BAzure Active Directory
CAzure Key Vault
DAzure DevOps
✗ Incorrect
Azure Key Vault often uses managed identities to allow secure access without credentials.
Explain what a managed identity is and why it is useful in Azure.
Think about how apps get permission without passwords.
You got /4 concepts.
Describe the difference between system-assigned and user-assigned managed identities.
One is created with a resource, the other is independent.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of managed identities in Azure?
easy
A. Allow resources to access other services securely without passwords
B. Store user passwords for Azure services
C. Create virtual machines automatically
D. Manage network traffic between resources
Solution
Step 1: Understand managed identities purpose
Managed identities provide a way for Azure resources to authenticate to other services without needing passwords.
Step 2: Compare options
Only Allow resources to access other services securely without passwords correctly describes this purpose. The other options describe unrelated functions.
Final Answer:
Allow resources to access other services securely without passwords -> Option A
Quick Check:
Managed identities = secure access without passwords [OK]
Hint: Managed identities remove password use for resource access [OK]
A. Enables a system-assigned managed identity for the resource
B. Assigns a user-assigned managed identity named 'identity1' to the resource
C. Disables all managed identities for the resource
D. Creates a new user-assigned identity named 'identity1'
Solution
Step 1: Analyze the identity type
The "type" is "UserAssigned", meaning the resource uses an existing user-assigned identity.
Step 2: Check the userAssignedIdentities property
The resource assigns the existing identity at the given resource ID path, named 'identity1'. It does not create a new identity.
Final Answer:
Assigns a user-assigned managed identity named 'identity1' to the resource -> Option B
Quick Check:
UserAssigned with identity path = Assigns a user-assigned managed identity named 'identity1' to the resource [OK]
Hint: UserAssigned type with identity path means assign existing identity [OK]
Common Mistakes:
Confusing system-assigned with user-assigned identity
Thinking the identity is created, not assigned
Ignoring the userAssignedIdentities property
4. You wrote this Azure resource config to enable a system-assigned managed identity:
{
"identity": { "type": "systemassigned" }
}
Why does this configuration fail to enable the identity?
medium
A. The resource group name is missing
B. The identity block is missing the "enabled" property
C. User-assigned identities require a different syntax
D. The type value is case-sensitive and must be "SystemAssigned"
Solution
Step 1: Check the type value case
Azure expects "SystemAssigned" with capital S and A. "systemassigned" is invalid due to case sensitivity.
Step 2: Validate other options
Stating that the identity block is missing the "enabled" property is incorrect because "enabled" is not required. User-assigned identities require a different syntax, but this config is for system-assigned. The resource group name is unrelated to this error.
Final Answer:
The type value is case-sensitive and must be "SystemAssigned" -> Option D
Quick Check:
Case-sensitive type value = The type value is case-sensitive and must be "SystemAssigned" [OK]
Hint: Check capitalization of "SystemAssigned" exactly [OK]
Common Mistakes:
Ignoring case sensitivity in type value
Adding unnecessary properties like "enabled"
Confusing system-assigned with user-assigned syntax
5. You want two Azure virtual machines to share the same managed identity to access a database securely. Which approach should you use?
hard
A. Create a user-assigned managed identity and assign it to both VMs
B. Assign a system-assigned managed identity to each VM separately
C. Use a shared password stored in Azure Key Vault
D. Enable managed identity only on one VM and share its credentials manually
Solution
Step 1: Understand identity sharing options
System-assigned identities are unique per resource and cannot be shared.
Step 2: Identify user-assigned identity use
User-assigned managed identities can be created once and assigned to multiple resources, allowing sharing.
Step 3: Evaluate other options
Using shared passwords or manual credential sharing is insecure and against best practices.
Final Answer:
Create a user-assigned managed identity and assign it to both VMs -> Option A
Quick Check:
User-assigned identity allows sharing = Create a user-assigned managed identity and assign it to both VMs [OK]
Hint: Use user-assigned identity to share across multiple resources [OK]
Common Mistakes:
Trying to share system-assigned identities
Using passwords instead of managed identities
Manually sharing credentials insecurely
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.