How do client secrets, certificates and federated credentials compare for service principals?
IntermediateConceptEntra ID, RBAC and Identities
Answer
| Credential | Risk | Rotation |
|---|---|---|
| Client secret | A string that leaks into logs, env vars, git | Manual, max 2 years (policy often 6–12 months) |
| Certificate | Private key can be kept in Key Vault or HSM | Manual or Key Vault auto-renew |
| Federated credential | No secret at all | Nothing to rotate |
Order of preference: managed identity, then federated credential, then certificate, and a client secret only when the platform supports nothing else. We use app management policies to block new secrets tenant-wide where possible.
More on Entra ID, RBAC and Identities
What is Microsoft Entra ID and how is it different from on-prem Active Directory?BeginnerWhat is the difference between an app registration and a service principal?BeginnerWhat is a managed identity and what problem does it solve?BeginnerSystem-assigned vs user-assigned managed identity: when do you use each?IntermediateHow does Azure RBAC evaluate access?IntermediateName the core built-in roles and the difference between Owner, Contributor and User Access Administrator.Beginner