|
| 1 | +--- |
| 2 | +title: Enable Azure Active Directory password writeback |
| 3 | +description: In this tutorial, you learn how to enable Azure AD self-service password reset writeback using Azure AD Connect to synchronize changes back to an on-premises Active Directory Domain Services environment. |
| 4 | + |
| 5 | +services: active-directory |
| 6 | +ms.service: active-directory |
| 7 | +ms.subservice: authentication |
| 8 | +ms.topic: tutorial |
| 9 | +ms.date: 02/18/2020 |
| 10 | + |
| 11 | +ms.author: iainfou |
| 12 | +author: iainfoulds |
| 13 | +ms.reviewer: rhicock |
| 14 | + |
| 15 | +ms.collection: M365-identity-device-management |
| 16 | + |
| 17 | +# Customer intent: As an Azure AD Administrator, I want to learn how to enable and use password writeback so that when end-users reset their password through a web browser their updated password is synchronized back to my on-premises AD environment. |
| 18 | +--- |
| 19 | +# Tutorial: Enable Azure Active Directory self-service password reset writeback to an on-premises environment |
| 20 | + |
| 21 | +With Azure Active Directory (Azure AD) self-service password reset (SSPR), users can update their password or unlock their account using a web browser. In a hybrid environment where Azure AD is connected to an on-premises Active Directory Domain Services (AD DS) environment, this scenario can cause passwords to be different between the two directories. |
| 22 | + |
| 23 | +Password writeback can be used to synchronize password changes in Azure AD back to your on-premises AD DS environment. Azure AD Connect provides a secure mechanism to send these password changes back to an existing on-premises directory from Azure AD. |
| 24 | + |
| 25 | +In this tutorial, you learn how to: |
| 26 | + |
| 27 | +> [!div class="checklist"] |
| 28 | +> * Configure the required permissions for password writeback |
| 29 | +> * Enable the password writeback option in Azure AD Connect |
| 30 | +> * Enable password writeback in Azure AD SSPR |
| 31 | +
|
| 32 | +## Prerequisites |
| 33 | + |
| 34 | +To complete this tutorial, you need the following resources and privileges: |
| 35 | + |
| 36 | +* A working Azure AD tenant with at least a trial license enabled. |
| 37 | + * If needed, [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
| 38 | + * For more information, see [Licensing requirements for Azure AD SSPR](concept-sspr-licensing.md). |
| 39 | +* An account with *global administrator* privileges. |
| 40 | +* Azure AD configured for self-service password reset. |
| 41 | + * If needed, [complete the previous tutorial to enable Azure AD SSPR](tutorial-enable-sspr.md). |
| 42 | +* An existing on-premises AD DS environment configured with a current version of Azure AD Connect. |
| 43 | + * If needed, configure Azure AD Connect using the [Express](../hybrid/how-to-connect-install-express.md) or [Custom](../hybrid/how-to-connect-install-custom.md) settings. |
| 44 | + |
| 45 | +## Configure account permissions for Azure AD Connect |
| 46 | + |
| 47 | +Azure AD Connect lets you synchronize users, groups, and credential between an on-premises AD DS environment and Azure AD. You typically install Azure AD Connect on a Windows Server 2012 or later computer that's joined to the on-premises AD DS domain. |
| 48 | + |
| 49 | +To correctly work with SSPR writeback, the account specified in Azure AD Connect must have the appropriate permissions and options set. If you're not sure which account is currently in use, open Azure AD Connect and select the **View current configuration** option. The account that you need to add permissions to is listed under **Synchronized Directories**. The following permissions and options must be set on the account: |
| 50 | + |
| 51 | +* **Reset password** |
| 52 | +* **Change password** |
| 53 | +* **Write permissions** on `lockoutTime` |
| 54 | +* **Write permissions** on `pwdLastSet` |
| 55 | +* **Extended rights** on either: |
| 56 | + * The root object of *each domain* in that forest |
| 57 | + * The user organizational units (OUs) you want to be in scope for SSPR |
| 58 | + |
| 59 | +If don't assign these permissions, writeback appears to be configured correctly, but users encounter errors when they manage their on-premises passwords from the cloud. |
| 60 | + |
| 61 | +To set up the appropriate permissions for password writeback to occur, complete the following steps: |
| 62 | + |
| 63 | +1. In your on-premises AD DS environment, open **Active Directory Users and Computers** with an account that has the appropriate *domain administrator* permissions. |
| 64 | +1. From the **View** menu, make sure that **Advanced features** are turned on. |
| 65 | +1. In the left panel, right-select the object that represents the root of the domain and select **Properties** > **Security** > **Advanced**. |
| 66 | +1. From the **Permissions** tab, select **Add**. |
| 67 | +1. For **Principal**, select the account that permissions should be applied to (the account used by Azure AD Connect). |
| 68 | +1. In the **Applies to** drop-down list, select **Descendant User objects**. |
| 69 | +1. Under *Permissions*, select the boxes for the following options: |
| 70 | + * **Change password** |
| 71 | + * **Reset password** |
| 72 | +1. Under *Properties*, select the boxes for the following options. You need to scroll through the list to find these options, which may already be set by default: |
| 73 | + * **Write lockoutTime** |
| 74 | + * **Write pwdLastSet** |
| 75 | + |
| 76 | + [](media/tutorial-enable-sspr-writeback/set-ad-ds-permissions.png#lightbox) |
| 77 | + |
| 78 | +1. When ready, select **Apply / OK** to apply the changes and exit any open dialog boxes. |
| 79 | + |
| 80 | +When you update permissions, it might take up to an hour or more for these permissions to replicate to all the objects in your directory. |
| 81 | + |
| 82 | +Password policies in the on-premises AD DS environment may prevent password resets from being correctly processed. For password writeback to work correctly, group policy for *Minimum password age* must be set to 0. This setting can be found under **Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies** within `gpedit.msc`. |
| 83 | + |
| 84 | +If you update the group policy, wait for the updated policy to replicate, or use the `gpupdate /force` command. |
| 85 | + |
| 86 | +## Enable password writeback in Azure AD Connect |
| 87 | + |
| 88 | +One of the configuration options in Azure AD Connect is for password writeback. When this option is enabled, password change events cause Azure AD Connect to synchronize the updated credentials back to the on-premises AD DS environment. |
| 89 | + |
| 90 | +To enable self-service password reset writeback, first enable the writeback option in Azure AD Connect. From your Azure AD Connect server, complete the following steps: |
| 91 | + |
| 92 | +1. Sign in to your Azure AD Connect server and start the **Azure AD Connect** configuration wizard. |
| 93 | +1. On the **Welcome** page, select **Configure**. |
| 94 | +1. On the **Additional tasks** page, select **Customize synchronization options**, and then select **Next**. |
| 95 | +1. On the **Connect to Azure AD** page, enter a global administrator credential for your Azure tenant, and then select **Next**. |
| 96 | +1. On the **Connect directories** and **Domain/OU** filtering pages, select **Next**. |
| 97 | +1. On the **Optional features** page, select the box next to **Password writeback** and select **Next**. |
| 98 | + |
| 99 | +  |
| 100 | + |
| 101 | +1. On the **Ready to configure** page, select **Configure** and wait for the process to finish. |
| 102 | +1. When you see the configuration finish, select **Exit**. |
| 103 | + |
| 104 | +## Enable password writeback for SSPR |
| 105 | + |
| 106 | +With password writeback enabled in Azure AD Connect, now configure Azure AD SSPR for writeback. When you enable SSPR to use password writeback, users who change or reset their password have that updated password synchronized back to the on-premises AD DS environment as well. |
| 107 | + |
| 108 | +To enable password writeback in SSPR, complete the following steps: |
| 109 | + |
| 110 | +1. Sign in to the [Azure portal](https://portal.azure.com) using a global administrator account. |
| 111 | +1. Search for and select **Azure Active Directory**, select **Password reset**, then choose **On-premises integration**. |
| 112 | +1. Set the option for **Write back passwords to your on-premises directory?** to *Yes*. |
| 113 | +1. Set the option for **Allow users to unlock accounts without resetting their password?** to *Yes*. |
| 114 | + |
| 115 | +  |
| 116 | + |
| 117 | +1. When ready, select **Save**. |
| 118 | + |
| 119 | +## Clean up resources |
| 120 | + |
| 121 | +If you no longer want to use the SSPR writeback functionality you have configured as part of this tutorial, complete the following steps: |
| 122 | + |
| 123 | +1. Sign in to the [Azure portal](https://portal.azure.com). |
| 124 | +1. Search for and select **Azure Active Directory**, select **Password reset**, then choose **On-premises integration**. |
| 125 | +1. Set the option for **Write back passwords to your on-premises directory?** to *No*. |
| 126 | +1. Set the option for **Allow users to unlock accounts without resetting their password?** to *No*. |
| 127 | + |
| 128 | +If you no longer want to use any password functionality, complete the following steps from your Azure AD Connect server: |
| 129 | + |
| 130 | +1. Sign in to your Azure AD Connect server and start the **Azure AD Connect** configuration wizard. |
| 131 | +1. On the **Welcome** page, select **Configure**. |
| 132 | +1. On the **Additional tasks** page, select **Customize synchronization options**, and then select **Next**. |
| 133 | +1. On the **Connect to Azure AD** page, enter a global administrator credential for your Azure tenant, and then select **Next**. |
| 134 | +1. On the **Connect directories** and **Domain/OU** filtering pages, select **Next**. |
| 135 | +1. On the **Optional features** page, deselect the box next to **Password writeback** and select **Next**. |
| 136 | +1. On the **Ready to configure** page, select **Configure** and wait for the process to finish. |
| 137 | +1. When you see the configuration finish, select **Exit**. |
| 138 | + |
| 139 | +## Next steps |
| 140 | + |
| 141 | +In this tutorial, you enabled Azure AD SSPR writeback to an on-premises AD DS environment. You learned how to: |
| 142 | + |
| 143 | +> [!div class="checklist"] |
| 144 | +> * Configure the required permissions for password writeback |
| 145 | +> * Enable the password writeback option in Azure AD Connect |
| 146 | +> * Enable password writeback in Azure AD SSPR |
| 147 | +
|
| 148 | +> [!div class="nextstepaction"] |
| 149 | +> [Evaluate risk at sign in](tutorial-risk-based-sspr-mfa.md) |
0 commit comments