NHI Forum
Original Article from Merill Fernando (PM @ Microsoft) - https://www.linkedin.com/feed/update/urn:li:activity:7350474706619162624/
When securing applications in Microsoft 365, Azure, and Entra environments, the authentication method you choose directly impacts your exposure to credential theft and misuse. This decision tree outlines the most secure approaches, ranked from strongest to weakest:
-
Managed Identities – Best Practice
-
Eliminates the need for app secrets entirely, preventing credential leaks.
-
Credentials are automatically provisioned and deleted with Azure resources.
-
Even Global Administrators cannot access the underlying credential.
-
Similar capabilities exist in AWS and GCP.
-
-
Workload Identity Federation – Strong Alternative
-
Allows Microsoft Entra ID to trust tokens from external identity providers such as AWS, GitHub, or Google Cloud.
-
Example: An AWS app with an Amazon Cognito identity can present its Cognito token to access Azure-protected resources.
-
Avoids storing long-lived secrets while enabling cross-platform integration.
-
-
Certificates – Acceptable Where Above Options Are Not Possible
-
Use short-lived certificates with secure private key protection.
-
Implement rotation processes and prepare for certificate rollover without downtime (e.g., by supporting multiple active keys).
-
Still requires operational vigilance to prevent leaks and outages.
-
-
Client ID & Secret – Least Secure, Avoid When Possible
-
Common due to simplicity, but highly prone to accidental exposure (e.g., checked into code, stored in plain text).
-
If used, secrets must be encrypted, rotated frequently, and monitored for compromise.
-
Encourage migration to stronger authentication methods.
-
Wherever possible, replace static secrets with Managed Identities or Workload Identity Federation. When neither is available, certificates offer a more secure fallback. Avoid client secrets entirely to reduce the risk of credential leaks.
To learn more about avoiding common app-related security pitfalls here: https://devblogs.microsoft.com/identity/public-v-confidential-clients/?source=nhimg
To learn about workload identity federation here: https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation/?source=nhimg
To learn about using Entra conditional access policies for workload identities here: https://learn.microsoft.com/en-us/entra/workload-id/workload-identities-faqs/?source=nhimg