Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

2.1.6. Managed Identities for Azure Resources

💡 First Principle: Any credential stored in code or configuration is a credential that can leak — in a repo, a config file, a log. A managed identity removes that risk category entirely by letting an Azure resource authenticate to Entra ID without any credential a developer ever has to see, store, or rotate.

System-assigned managed identities are tied to the lifecycle of a single resource (created and deleted with it) — simple, but not reusable elsewhere. User-assigned managed identities exist as standalone resources that can be attached to multiple Azure resources at once and outlive any single resource's lifecycle — useful when several resources need the same identity and permission set.

TypeLifecycleReusable Across Resources?
System-assignedTied to the resource; deleted when the resource is deletedNo — one-to-one
User-assignedIndependent Azure resource; managed separatelyYes — one-to-many

⚠️ Exam Trap: "Almost every connection string in a scenario question is a wrong-answer signal." If a described architecture has an Azure Function connecting to Key Vault or Storage using a stored connection string or access key, the more secure — and usually correct — answer is to replace it with a managed identity and Azure RBAC, not to just "rotate the key more often."

Reflection Question: Two Azure Functions and a Logic App all need the same read access to a shared Key Vault. Would a system-assigned or user-assigned managed identity fit that requirement better, and why?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications