Designing authentication and authorisation
Pick the right sign-in method, identity solution and authorisation model, and decide where secrets, keys and certificates live.
In this lesson you'll learn
- Hybrid sign-in options: password hash sync, pass-through and federation
- Identities for employees, partners and customers
- Authorising access to Azure and to on-premises apps
- Key Vault, Managed HSM and managed identities
1. Authentication for hybrid organisations
Refresher: hybrid identity
Many organisations keep user accounts in on-premises Active Directory. Microsoft Entra Connect Sync or the lighter Microsoft Entra Cloud Sync copies them to Microsoft Entra ID, so people use one account for everything.
| Sign-in method | How it works | Recommend when |
|---|---|---|
| Password hash sync (PHS) | A hash of the password hash is synced, and Entra ID checks sign-ins itself | Default choice: simplest, works if on-premises is down, enables leaked credential detection |
| Pass-through authentication (PTA) | Agents on-premises check the password against AD | Policy says passwords must be validated on-premises |
| Federation (AD FS) | Sign-in is redirected to an on-premises federation service | Only for requirements Entra ID can't meet, such as certain third-party MFA or smart card setups |
2. Identity solutions for different people
| Who | Recommend |
|---|---|
| Employees | Microsoft Entra ID (workforce tenant), with Conditional Access and MFA |
| Partner staff who use their own work accounts | B2B collaboration (guest users) |
| Customers signing up to your app with email or social accounts | Microsoft Entra External ID (external tenant). Azure AD B2C is no longer sold to new customers. |
| Legacy apps that need LDAP, Kerberos or domain join in Azure | Microsoft Entra Domain Services |
| Apps and services calling Azure | Managed identities (no secrets to store) |
3. Authorising access
To Azure resources: use Azure RBAC with the least-privileged built-in role at the narrowest scope, assigned to groups rather than individuals. Add Conditional Access for sign-in conditions and PIM for privileged roles.
To on-premises apps: publish internal web apps through Microsoft Entra application proxy (part of Microsoft Entra Private Access). Users sign in with Entra ID and Conditional Access, and no inbound firewall ports are opened. For apps using Windows authentication, application proxy can use Kerberos constrained delegation for single sign-on.
Exam focus
"Give remote users secure access to an internal web app without a VPN, using MFA" points to Microsoft Entra application proxy with a Conditional Access policy.
4. Secrets, keys and certificates
| Requirement | Recommend |
|---|---|
| Store app secrets, keys and certificates centrally | Azure Key Vault (Standard) |
| Keys must be protected by hardware security modules | Key Vault Premium (HSM-protected keys) |
| A single-tenant HSM pool that only you control, for strict compliance | Azure Key Vault Managed HSM |
| Apps must read secrets without storing any credentials | Managed identity with the Key Vault Secrets User role |
| Rotate and renew certificates automatically | Key Vault certificates with a supported issuer |
Example
Ironbridge Payments's payment service must keep encryption keys in a dedicated, single-tenant HSM to meet a banking regulator's rules, while its web apps simply need a database password. The architect recommends Managed HSM for the payment keys and a standard Key Vault for app secrets, with each app reading secrets through its own managed identity.
Exam traps to remember
- Password hash sync is the recommended default. It keeps sign-in working even when on-premises is unavailable.
- Customer sign-up and social sign-in point to External ID, not B2B.
- Prefer managed identities over service principals with secrets wherever the service supports them.
- Managed HSM is about single-tenant control and compliance. Key Vault Premium is enough for HSM-protected keys in most cases.
Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-305 Azure Solutions Architect app.
Practise in the app