You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an administrator, you can [reset a user's password](manage-users-portal.md#reset-a-users-password) if the user forgets their password. Or you would like to force them to reset the password. In this article, you'll learn how to force a password reset in these scenarios.
@@ -31,13 +29,6 @@ When an administrator resets a user's password via the Azure portal, the value o
31
29
32
30
The password reset flow is applicable to local accounts in Azure AD B2C that use an [email address](sign-in-options.md#email-sign-in) or [username](sign-in-options.md#username-sign-in) with a password for sign-in.
33
31
34
-
::: zone-end
35
-
36
-
::: zone pivot="b2c-custom-policy"
37
-
38
-
This feature is currently only available for User Flows. For setup steps, choose **User Flow** above. For custom policies, use the force password reset first logon [GitHub sample](https://github.com/azure-ad-b2c/samples/tree/master/policies/force-password-reset-first-logon) with prerequisites below.
39
-
40
-
::: zone-end
41
32
42
33
## Prerequisites
43
34
@@ -75,6 +66,36 @@ To enable the **Forced password reset** setting in a sign-up or sign-in user flo
75
66
1. Sign in with the user account for which you reset the password.
76
67
1. You now must change the password for the user. Change the password and select **Continue**. The token is returned to `https://jwt.ms` and should be displayed to you.
77
68
69
+
::: zone-end
70
+
71
+
::: zone pivot="b2c-custom-policy"
72
+
73
+
## Configure your custom policy
74
+
75
+
Get the example of the force password reset policy on [GitHub](https://github.com/azure-ad-b2c/samples/tree/master/policies/force-password-reset). In each file, replace the string `yourtenant` with the name of your Azure AD B2C tenant. For example, if the name of your B2C tenant is *contosob2c*, all instances of `yourtenant.onmicrosoft.com` become `contosob2c.onmicrosoft.com`.
76
+
77
+
## Upload and test the policy
78
+
79
+
1. Sign in to the [Azure portal](https://portal.azure.com/).
80
+
1. Make sure you're using the directory that contains your Azure AD B2C tenant by selecting the **Directories + subscriptions** icon in the portal toolbar.
81
+
1. On the **Portal settings | Directories + subscriptions** page, find your Azure AD B2C directory in the **Directory name** list, and then select **Switch**.
82
+
1. Choose **All services** in the top-left corner of the Azure portal, and then search for and select **Azure AD B2C**.
83
+
1. Select **Identity Experience Framework**.
84
+
1. In **Custom Policies**, select **Upload Policy**.
85
+
1. Select the *TrustFrameworkExtensionsCustomForcePasswordReset.xml* file.
86
+
1. Select **Upload**.
87
+
1. Repeat steps 6 through 8 for the relying party file *TrustFrameworkExtensionsCustomForcePasswordReset.xml*.
88
+
89
+
## Run the policy
90
+
91
+
1. Open the policy that you uploaded *B2C_1A_TrustFrameworkExtensions_custom_ForcePasswordReset*.
92
+
1. For **Application**, select the application that you registered earlier. To see the token, the **Reply URL** should show `https://jwt.ms`.
93
+
1. Select **Run now**.
94
+
1. Sign in with the user account for which you reset the password.
95
+
1. You now must change the password for the user. Change the password and select **Continue**. The token is returned to `https://jwt.ms` and should be displayed to you.
96
+
97
+
::: zone-end
98
+
78
99
## Force password reset on next login
79
100
80
101
To force reset the password on next login, update the account password profile using MS Graph [Update user](/graph/api/user-update) operation. The following example updates the password profile [forceChangePasswordNextSignIn](user-profile-attributes.md#password-profile-property) attribute to `true`, which forces the user to reset the password on next login.
@@ -123,8 +144,6 @@ Once a password expiration policy has been set, you must also configure force pa
123
144
124
145
The password expiry duration default value is **90** days. The value is configurable by using the [Set-MsolPasswordPolicy](/powershell/module/msonline/set-msolpasswordpolicy) cmdlet from the Azure Active Directory Module for Windows PowerShell. This command updates the tenant, so that all users' passwords expire after number of days you configure.
125
146
126
-
::: zone-end
127
-
128
147
## Next steps
129
148
130
149
Set up a [self-service password reset](add-password-reset-policy.md).
0 commit comments