Demystifying Service Principals - Managed Identities

This post clarifies the concepts of Azure AD Service Principals and Managed Identities, explaining their similarities and differences. It details how Service Principals are used for authentication with Azure resources, providing examples with Terraform and Azure DevOps Service Connections, and highlights their challenges such as credential exposure and expiration. It then introduces Managed Identities (System Assigned and User Assigned) as a more secure alternative where credentials are automatically managed and unknown to users. The post provides step-by-step guides for creating and assigning both System Assigned and User Assigned Managed Identities to Azure resources like Virtual Machines and Web Apps, and demonstrates their use in accessing Azure Key Vault.
More from the Azure DevOps Service Connection with Microsoft Entra trail
- You can now use the Azure DevOps Service Connection instead of a PAT or Build Session token
- Retirement of Azure DevOps issuer in Workload identity federation service connections
- Optimizing Git policy management at scale
- Azure DevOps MCP Server April Update
- One-click security scanning and org-wide alert triage come to Advanced Security