Many organizations want to let users sign in to Microsoft Entra ID using the same credentials as their on-premises directory environment. With this approach, known as hybrid authentication, users only need to remember one set of credentials.
Some organizations haven't moved to hybrid authentication for the following reasons:
By default, the Microsoft Entra user Principal Name (UPN) is set to the same value as the on-premises UPN.
Changing the Microsoft Entra UPN creates a mismatch between on-premises and Microsoft Entra environments that could cause problems with certain applications and services.
Due to business or compliance reasons, the organization doesn't want to use the on-premises UPN to sign in to Microsoft Entra ID.
To move toward hybrid authentication, you can configure Microsoft Entra ID to let users sign in with their email as an alternate login ID. For example, if Contoso rebranded to Fabrikam, rather than continuing to sign in with the legacy ana@contoso.com UPN, email as an alternate login ID can be used. To access an application or service, users would sign in to Microsoft Entra ID using their non-UPN email, such as ana@fabrikam.com.
This article shows you how to enable and use email as an alternate login ID.
Before you begin
Here's what you need to know about email as an alternate login ID:
The feature is available in Microsoft Entra ID Free edition and higher.
The feature enables sign-in with ProxyAddresses, in addition to UPN, for cloud-authenticated Microsoft Entra users. More on how this applies to Microsoft Entra business-to-business (B2B) collaboration in the B2B section.
When a user signs in with a non-UPN email, the unique_name and preferred_username claims (if present) in the ID token will return the non-UPN email.
If the non-UPN email in use becomes stale (no longer belongs to the user), these claims will return the UPN instead.
The feature supports managed authentication with Password Hash Sync (PHS) or Pass-Through Authentication (PTA).
There are two options for configuring the feature:
Staged rollout policy - Use this option to test the feature with specific Microsoft Entra groups. When you first add a security group for staged rollout, you're limited to 200 users to avoid a UX time-out. After you've added the group, you can add more users directly to it, as required.
Preview limitations
In the current preview state, the following limitations apply to email as an alternate login ID:
User experience - Users may see their UPN, even when they signed-in with their non-UPN email. The following example behavior may be seen:
User is prompted to sign in with UPN when directed to Microsoft Entra sign-in with login_hint=<non-UPN email>.
When a user signs-in with a non-UPN email and enters an incorrect password, the "Enter your password" page changes to display the UPN.
On some Microsoft sites and apps, such as Microsoft Office, the Account Manager control typically displayed in the upper right may display the user's UPN instead of the non-UPN email used to sign in.
Unsupported flows - Some flows are currently not compatible with non-UPN emails, such as the following:
Microsoft Entra ID Protection doesn't match non-UPN emails with Leaked Credentials risk detection. This risk detection uses the UPN to match credentials that have been leaked. For more information, see How To: Investigate risk.
When a user is signed-in with a non-UPN email, they cannot change their password. Microsoft Entra self-service password reset (SSPR) should work as expected. During SSPR, the user may see their UPN if they verify their identity using a non-UPN email.
Unsupported scenarios - The following scenarios are not supported. Sign-in with non-UPN email for:
Unsupported apps - Some third-party applications may not work as expected if they assume that the unique_name or preferred_username claims are immutable or will always match a specific user attribute, such as UPN.
Logging - Changes made to the feature's configuration in HRD policy are not explicitly shown in the audit logs.
Staged rollout policy - The following limitations apply only when the feature is enabled using staged rollout policy:
The feature does not work as expected for users that are included in other staged rollout policies.
Staged rollout policy supports a maximum of 10 groups per feature.
Staged rollout policy does not support nested groups.
Staged rollout policy does not support dynamic membership groups.
Contact objects inside the group will block the group from being added to a staged rollout policy.
Duplicate values - Within a tenant, a cloud-only user's UPN can be the same value as another user's proxy address synced from the on-premises directory. In this scenario, with the feature enabled, the cloud-only user will not be able to sign in with their UPN. More on this issue in the Troubleshoot section.
Overview of alternate login ID options
To sign in to Microsoft Entra ID, users enter a value that uniquely identifies their account. Historically, you could only use the Microsoft Entra UPN as the sign-in identifier.
For organizations where the on-premises UPN is the user's preferred sign-in email, this approach was great. Those organizations would set the Microsoft Entra UPN to the exact same value as the on-premises UPN, and users would have a consistent sign-in experience.
Alternate Login ID for AD FS
However, in some organizations the on-premises UPN isn't used as a sign-in identifier. In the on-premises environments, you would configure the local AD DS to allow sign-in with an alternate login ID. Setting the Microsoft Entra UPN to the same value as the on-premises UPN isn't an option as Microsoft Entra ID would then require users to sign in with that value.
Alternate Login ID in Microsoft Entra Connect
The typical workaround to this issue was to set the Microsoft Entra UPN to the email address the user expects to sign in with. This approach works, though results in different UPNs between the on-premises AD and Microsoft Entra ID, and this configuration isn't compatible with all Microsoft 365 workloads.
Email as an Alternate Login ID
A different approach is to synchronize the Microsoft Entra ID and on-premises UPNs to the same value and then configure Microsoft Entra ID to allow users to sign in to Microsoft Entra ID with a verified email. To provide this ability, you define one or more email addresses in the user's ProxyAddresses attribute in the on-premises directory. ProxyAddresses are then synchronized to Microsoft Entra ID automatically using Microsoft Entra Connect.
Synchronize an alternate attribute (such as Mail) as the Microsoft Entra UPN.
Email as an Alternate Login ID
Enable sign-in with verified domain ProxyAddresses for Microsoft Entra users.
Synchronize sign-in email addresses to Microsoft Entra ID
Traditional Active Directory Domain Services (AD DS) or Active Directory Federation Services (AD FS) authentication happens directly on your network and is handled by your AD DS infrastructure. With hybrid authentication, users can instead sign in directly to Microsoft Entra ID.
In both configuration options, the user submits their username and password to Microsoft Entra ID, which validates the credentials and issues a ticket. When users sign in to Microsoft Entra ID, it removes the need for your organization to host and manage an AD FS infrastructure.
One of the user attributes that's automatically synchronized by Microsoft Entra Connect is ProxyAddresses. If users have an email address defined in the on-premises AD DS environment as part of the ProxyAddresses attribute, it's automatically synchronized to Microsoft Entra ID. This email address can then be used directly in the Microsoft Entra sign-in process as an alternate login ID.
Important
Only emails in verified domains for the tenant are synchronized to Microsoft Entra ID. Each Microsoft Entra tenant has one or more verified domains, for which you have proven ownership, and are uniquely bound to your tenant.
Email as an alternate login ID applies to Microsoft Entra B2B collaboration under a "bring your own sign-in identifiers" model. When email as an alternate login ID is enabled in the home tenant, Microsoft Entra users can perform guest sign in with non-UPN email on the resource tenant endpoint. No action is required from the resource tenant to enable this functionality.
Note
When an alternate login ID is used on a resource tenant endpoint that does not have the functionality enabled, the sign-in process will work seamlessly, but SSO will be interrupted.
Once users with the ProxyAddresses attribute applied are synchronized to Microsoft Entra ID using Microsoft Entra Connect, you need to enable the feature for users to sign in with email as an alternate login ID for your tenant. This feature tells the Microsoft Entra login servers to not only check the sign-in identifier against UPN values, but also against ProxyAddresses values for the email address.
You can use either Microsoft Entra admin center or Graph PowerShell to set up the feature.
Once users with the ProxyAddresses attribute applied are synchronized to Microsoft Entra ID using Microsoft Entra Connect, you need to enable the feature for users to sign-in with email as an alternate login ID for your tenant. This feature tells the Microsoft Entra login servers to not only check the sign-in identifier against UPN values, but also against ProxyAddresses values for the email address.
The command will ask you to authenticate using a web browser.
Check if a HomeRealmDiscoveryPolicy already exists in your tenant using the Get-MgPolicyHomeRealmDiscoveryPolicy cmdlet as follows:
PowerShell
Get-MgPolicyHomeRealmDiscoveryPolicy
If there's no policy currently configured, the command returns nothing. If a policy is returned, skip this step and move on to the next step to update an existing policy.
To add the HomeRealmDiscoveryPolicy to the tenant, use the New-MgPolicyHomeRealmDiscoveryPolicy cmdlet and set the AlternateIdLogin attribute to "Enabled": true as shown in the following example:
If the policy exists but the AlternateIdLogin attribute that isn't present or enabled, or if other attributes exist on the policy you wish to preserve, update the existing policy using the Update-MgPolicyHomeRealmDiscoveryPolicy cmdlet.
Important
When you update the policy, make sure you include any old settings and the new AlternateIdLogin attribute.
The following example adds the AlternateIdLogin attribute and preserves the AllowCloudPasswordValidation attribute that was previously set:
Staged rollout policy allows tenant administrators to enable features for specific Microsoft Entra groups. It is recommended that tenant administrators use staged rollout to test user sign-in with an email address. When administrators are ready to deploy this feature to their entire tenant, they should use HRD policy.
Find the directoryObject ID for the group to be added to the staged rollout policy. Note the value returned for the Id parameter, because it will be used in the next step.
PowerShell
Get-MgBetaGroup -Filter"DisplayName eq 'Name of group to be added to the staged rollout policy'"
Add the group to the staged rollout policy as shown in the following example. Replace the value in the -FeatureRolloutPolicyId parameter with the value returned for the policy ID in step 4 and replace the value in the -OdataId parameter with the Id noted in step 5. It may take up to 1 hour before users in the group can sign in to Microsoft Entra ID with email as an alternate login ID.
To test that users can sign in with email, go to https://myprofile.microsoft.com and sign in with a non-UPN email, such as balas@fabrikam.com. The sign-in experience should look and feel the same as signing-in with the UPN.
Troubleshoot
If users have trouble signing in with their email address, review the following troubleshooting steps:
Make sure it's been at least 1 hour since email as an alternate login ID was enabled. If the user was recently added to a group for staged rollout policy, make sure it's been at least 24 hours since they were added to the group.
If using HRD policy, confirm that the Microsoft Entra ID HomeRealmDiscoveryPolicy has the AlternateIdLogin definition property set to "Enabled": true and the IsOrganizationDefault property set to True:
If using staged rollout policy, confirm that the Microsoft Entra ID FeatureRolloutPolicy has the IsEnabled property set to True:
PowerShell
Get-MgBetaPolicyFeatureRolloutPolicy
Make sure the user account has their email address set in the ProxyAddresses attribute in Microsoft Entra ID.
Sign-in logs
You can review the sign-in logs in Microsoft Entra ID for more information. Sign-ins with email as an alternate login ID will emit proxyAddress in the Sign-in identifier type field and the inputted username in the Sign-in identifier field.
Conflicting values between cloud-only and synced users
Within a tenant, a cloud-only user's UPN may take on the same value as another user's proxy address synced from the on-premises directory. In this scenario, with the feature enabled, the cloud-only user will not be able to sign in with their UPN. Here are the steps for detecting instances of this issue.
Open a PowerShell session as an administrator, then install the AzureADPreview module using the Install-Module cmdlet:
PowerShell
Install-Module Microsoft.Graph.Beta
If prompted, select Y to install NuGet or to install from an untrusted repository.
# Get all users$allUsers = Get-MgUser -All# Get list of proxy addresses from all synced users$syncedProxyAddresses = $allUsers |
Where-Object {$_.ImmutableId} |
Select-Object -ExpandProperty ProxyAddresses |
ForEach-Object {$_ -Replace"smtp:", ""}
# Get list of user principal names from all cloud-only users$cloudOnlyUserPrincipalNames = $allUsers |
Where-Object {!$_.ImmutableId} |
Select-Object -ExpandProperty UserPrincipalName
# Get intersection of two lists$duplicateValues = $syncedProxyAddresses |
Where-Object {$cloudOnlyUserPrincipalNames -Contains$_}
Discover how Microsoft Entra External ID can provide secure, seamless sign-in experiences for your consumers and business customers. Explore tenant creation, app registration, flow customization, and account security.