|
| 1 | +--- |
| 2 | +title: Sign in with email as an alternate login ID for Azure Active Directory |
| 3 | +description: Learn how to configure and enable users to sign in to Azure Active Directory using their email address as an alternate login ID (preview) |
| 4 | + |
| 5 | +services: active-directory |
| 6 | +ms.service: active-directory |
| 7 | +ms.subservice: authentication |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 05/22/2020 |
| 10 | + |
| 11 | +ms.author: iainfou |
| 12 | +author: iainfoulds |
| 13 | +manager: daveba |
| 14 | +ms.reviewer: scottsta |
| 15 | + |
| 16 | +--- |
| 17 | +# Sign-in to Azure using email as an alternate login ID (preview) |
| 18 | + |
| 19 | +Many organizations want to let users sign in to Azure 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. |
| 20 | + |
| 21 | +Some organizations haven't moved to hybrid authentication for the following reasons: |
| 22 | + |
| 23 | +* By default, the Azure Active Directory (Azure AD) user principal name (UPN) is set to the same UPN as the on-premises directory. |
| 24 | +* Changing the Azure AD UPN creates a mis-match between on-prem and Azure environments that could cause problems with certain applications and services. |
| 25 | +* Due to business or compliance reasons, the organization doesn't want to use the on-premises UPN to sign in to Azure. |
| 26 | + |
| 27 | +To help with the move to hybrid authentication, you can now configure Azure AD to let users sign in to Azure with an email in your verified domain as an alternate login ID. For example, if *Contoso * rebranded to *Fabrikam *, rather than continuing to sign in with the legacy `[email protected]` UPN, email as an alternate login ID can now be used. To access an application or services, users would sign in to Azure using their assigned email, such as `[email protected]`. |
| 28 | + |
| 29 | +| | |
| 30 | +| --- | |
| 31 | +| Sign in to Azure AD with email as an alternate login ID is a public preview feature of Azure Active Directory. For more information about previews, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).| |
| 32 | +| | |
| 33 | + |
| 34 | +## Overview of Azure AD sign-in approaches |
| 35 | + |
| 36 | +User Principal Names (UPNs) are unique identifiers for a user account in both your on-premises directory, and in Azure AD. Each user account in a directory is represented by a UPN, such as `[email protected]`. By default, when you synchronize an on-premises Active Directory Domain Services (AD DS) environment with Azure AD, the Azure AD UPN is to set to match the on-premises UPN. |
| 37 | + |
| 38 | +In many organizations, it's fine to set the on-premises UPN and Azure AD UPN to match. When users sign in to Azure applications and services, they use their Azure AD UPN. However, some organizations can't use matching UPNs for sign-in due to business policies or user experience issues. |
| 39 | + |
| 40 | +Organizations that can't use matching UPNs in Azure AD have a few options: |
| 41 | + |
| 42 | +* One approach is to set the Azure AD UPN to something different based on the business needs, such as `[email protected]`. |
| 43 | + * However, not all applications and services are compatible with using a different value for the on-premises UPN and the Azure AD UPN. |
| 44 | +* A better approach is to ensure the Azure AD and on-premises UPNs are set to the same value, and configure Azure AD to let users sign into Azure with their email as an alternate login ID. |
| 45 | + |
| 46 | +With email as an alternate login ID, users can still sign in to Azure by entering their UPN, but can also sign in using their email. To support this, you define an email address in the user's *ProxyAddresses* attribute in the on-premises directory. This *ProxyAddress* attribute supports one or more email addresses. |
| 47 | + |
| 48 | +## Synchronize sign-in email addresses to Azure AD |
| 49 | + |
| 50 | +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 Azure AD. |
| 51 | + |
| 52 | +To support this hybrid authentication approach, you synchronize your on-premises AD DS environment to Azure AD using [Azure AD Connect][azure-ad-connect] and configure it to use Password Hash Sync (PHS) or Pass-Through Authentication (PTA). |
| 53 | + |
| 54 | +In both configuration options, the user submits their username and password to Azure AD, which validates the credentials and issues a ticket. When users sign in to Azure AD, it removes the need for your organization to host and manage an AD FS infrastructure. |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +One of the user attributes that's automatically synchronized by Azure AD Connect is *ProxyAddresses*. If users have an email address defined in the on-prem AD DS environment as part of the *ProxyAddresses* attribute, it's automatically synchronized to Azure AD. This email address can then be used directly in the Azure AD sign-in process as an alternate login ID. |
| 61 | + |
| 62 | +> [!IMPORTANT] |
| 63 | +> Only emails in verified domains for the tenant are synchronized to Azure AD. Each Azure AD tenant has one or more verified domains, for which you have proven ownership, and are uniquely bound to you tenant. |
| 64 | +> |
| 65 | +> For more information, see [Add and verify a custom domain name in Azure AD][verify-domain]. |
| 66 | +
|
| 67 | +For more information, see [Choose the right authentication method for your Azure AD hybrid identity solution][hybrid-auth-methods]. |
| 68 | + |
| 69 | +## Enable user sign-in with an email address |
| 70 | + |
| 71 | +Once users with the *ProxyAddresses* attribute applied are synchronized to Azure AD using Azure AD 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 Azure AD login servers to not only check the sign-in name against UPN values, but also against *ProxyAddresses* values for the email address. |
| 72 | + |
| 73 | +During preview, you can currently only enable the sign-in with email as an alternate login ID feature using PowerShell. You need *tenant administrator* permissions to complete the following steps: |
| 74 | + |
| 75 | +1. Open an PowerShell session as an administrator, then install the *AzureADPreview* module using the [Install-Module][Install-Module] cmdlet: |
| 76 | + |
| 77 | + ```powershell |
| 78 | + Install-Module AzureADPreview |
| 79 | + ``` |
| 80 | +
|
| 81 | + If prompted, select **Y** to install NuGet or to install from an untrusted repository. |
| 82 | +
|
| 83 | +1. Sign in to your Azure AD tenant as a *tenant administrator* using the [Connect-AzureAD][Connect-AzureAD] cmdlet: |
| 84 | +
|
| 85 | + ```powershell |
| 86 | + Connect-AzureAD |
| 87 | + ``` |
| 88 | +
|
| 89 | + The command returns information about your account, environment, and tenant ID. |
| 90 | +
|
| 91 | +1. Check if the *HomeRealmDiscoveryPolicy* policy already exists in your tenant using the [Get-AzureADPolicy][Get-AzureADPolicy] cmdlet as follows: |
| 92 | +
|
| 93 | + ```powershell |
| 94 | + Get-AzureADPolicy | where-object {$_.Type -eq "HomeRealmDiscoveryPolicy"} | fl * |
| 95 | + ``` |
| 96 | +
|
| 97 | +1. 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. |
| 98 | +
|
| 99 | + To add the *HomeRealmDiscoveryPolicy* policy to the tenant, use the [New-AzureADPolicy][New-AzureADPolicy] cmdlet and set the *AlternateIdLogin* attribute to *"Enabled": true* as shown in the following example: |
| 100 | +
|
| 101 | + ```powershell |
| 102 | + New-AzureADPolicy -Definition @('{"HomeRealmDiscoveryPolicy" :{"AlternateIdLogin":{"Enabled": true}}}') ` |
| 103 | + -DisplayName "BasicAutoAccelerationPolicy" ` |
| 104 | + -IsOrganizationDefault $true ` |
| 105 | + -Type "HomeRealmDiscoveryPolicy" |
| 106 | + ``` |
| 107 | +
|
| 108 | + When the policy has been successfully created, the command returns the policy ID, as shown in the following example output: |
| 109 | +
|
| 110 | + ```powershell |
| 111 | + Id DisplayName Type IsOrganizationDefault |
| 112 | + -- ----------- ---- --------------------- |
| 113 | + 5de3afbe-4b7a-4b33-86b0-7bbe308db7f7 BasicAutoAccelerationPolicy HomeRealmDiscoveryPolicy True |
| 114 | + ``` |
| 115 | +
|
| 116 | +1. If there's already a configured policy, check if the *AlternateIdLogin* attribute is enabled, as shown in the following example policy output: |
| 117 | +
|
| 118 | + ```powershell |
| 119 | + Id : 5de3afbe-4b7a-4b33-86b0-7bbe308db7f7 |
| 120 | + OdataType : |
| 121 | + AlternativeIdentifier : |
| 122 | + Definition : {{"HomeRealmDiscoveryPolicy" :{"AlternateIdLogin":{"Enabled": true}}}} |
| 123 | + DisplayName : BasicAutoAccelerationPolicy |
| 124 | + IsOrganizationDefault : True |
| 125 | + KeyCredentials : {} |
| 126 | + Type : HomeRealmDiscoveryPolicy |
| 127 | + ``` |
| 128 | +
|
| 129 | + 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 [Set-AzureADPolicy][Set-AzureADPolicy] cmdlet. |
| 130 | +
|
| 131 | + > [!IMPORTANT] |
| 132 | + > When you update the policy, make sure you include any old settings and the new *AlternateIdLogin* attribute. |
| 133 | +
|
| 134 | + The following example adds the *AlternateIdLogin* attribute and preserves the *AllowCloudPasswordValidation* attribute that may have already been set: |
| 135 | +
|
| 136 | + ```powershell |
| 137 | + Set-AzureADPolicy -id b581c39c-8fe3-4bb5-b53d-ea3de05abb4b ` |
| 138 | + -Definition @('{"HomeRealmDiscoveryPolicy" :{"AllowCloudPasswordValidation":true,"AlternateIdLogin":{"Enabled": true}}}') ` |
| 139 | + -DisplayName "BasicAutoAccelerationPolicy" ` |
| 140 | + -IsOrganizationDefault $true ` |
| 141 | + -Type "HomeRealmDiscoveryPolicy" |
| 142 | + ``` |
| 143 | +
|
| 144 | + Confirm that the updated policy shows your changes and that the *AlternateIdLogin* attribute is now enabled: |
| 145 | +
|
| 146 | + ```powershell |
| 147 | + Get-AzureADPolicy | where-object {$_.Type -eq "HomeRealmDiscoveryPolicy"} | fl * |
| 148 | + ``` |
| 149 | +
|
| 150 | +## Test user sign-in with email |
| 151 | +
|
| 152 | +To test that users can sign in with email, browse to [https://myprofile.microsoft.com][my-profile] and sign in with a user account based on their email address, such as `[email protected]`, not their UPN, such as `[email protected]`. The sign-in experience should look and feel the same as with a UPN-based sign-in event. |
| 153 | +
|
| 154 | +## Troubleshoot |
| 155 | +
|
| 156 | +If users have trouble with sign-in events using their email address, review the following troubleshooting steps: |
| 157 | +
|
| 158 | +1. Make sure the user account has their email address set for the *ProxyAddresses* attribute in the on-prem AD DS environment. |
| 159 | +1. Verify that Azure AD Connect is configured and successfully synchronizes user accounts from the on-prem AD DS environment into Azure AD. |
| 160 | +1. Confirm that the Azure AD *HomeRealmDiscoveryPolicy* policy has the *AlternateIdLogin* attribute set to *"Enabled": true*: |
| 161 | +
|
| 162 | + ```powershell |
| 163 | + Get-AzureADPolicy | where-object {$_.Type -eq "HomeRealmDiscoveryPolicy"} | fl * |
| 164 | + ``` |
| 165 | +
|
| 166 | +## Next steps |
| 167 | +
|
| 168 | +To learn more about hybrid identity, such as Azure AD App Proxy or Azure AD Domain Services, see [Azure AD hybrid identity for access and management of on-prem workloads][hybrid-overview]. |
| 169 | +
|
| 170 | +For more information on hybrid identity operations, see [how password hash sync][phs-overview] or [pass-through authentication][pta-overview] synchronization work. |
| 171 | +
|
| 172 | +<!-- INTERNAL LINKS --> |
| 173 | +[verify-domain]: ../fundamentals/add-custom-domain.md |
| 174 | +[hybrid-auth-methods]: ../hybrid/choose-ad-authn.md |
| 175 | +[azure-ad-connect]: ../hybrid/whatis-azure-ad-connect.md |
| 176 | +[hybrid-overview]: ../hybrid/cloud-governed-management-for-on-premises.md |
| 177 | +[phs-overview]: ../hybrid/how-to-connect-password-hash-synchronization.md |
| 178 | +[pta-overview]: ../hybrid/how-to-connect-pta-how-it-works.md |
| 179 | +
|
| 180 | +<!-- EXTERNAL LINKS --> |
| 181 | +[Install-Module]: /powershell/module/powershellget/install-module |
| 182 | +[Connect-AzureAD]: /powershell/module/azuread/connect-azuread |
| 183 | +[Get-AzureADPolicy]: /powershell/module/azuread/get-azureadpolicy |
| 184 | +[New-AzureADPolicy]: /powershell/module/azuread/new-azureadpolicy |
| 185 | +[Set-AzureADPolicy]: /powershell/module/azuread/set-azureadpolicy |
| 186 | +[my-profile]: https://myprofile.microsoft.com |
0 commit comments