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
Clarify behavior of AcountEnabled and Password (#21006)
* Clarify behavior of AcountEnabled and Password
`Update-AzAdUser` in `Az.Resources` v6.0.1 automatically enables the user account when the password changes, ignoring the `-AccountEnabled` parameter. In previous versions of the cmdlet the password could be updated at the same time the account was disabled. That now requires two separate calls to `Update-AzAdUser`: one to set the password, and a second to disable the account.
* Update src/Resources/Resources/ChangeLog.md
---------
Co-authored-by: Beisi Zhou <[email protected]>
Copy file name to clipboardExpand all lines: src/Resources/Resources/help/Update-AzADUser.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,7 @@ Update user by user principal name
88
88
89
89
### -AccountEnabled
90
90
true for enabling the account; otherwise, false.
91
+
Always true when combined with `-Password`.
91
92
92
93
```yaml
93
94
Type: System.Boolean
@@ -872,7 +873,7 @@ To create the parameters described below, construct a hash table containing the
872
873
- `[(Any) <Object>]`: This indicates any property can be added to this object.
873
874
- `[DeletedDateTime <DateTime?>]`: Date and time when this object was deleted. Always null when the object hasn't been deleted.
874
875
- `[DisplayName <String>]`: The name displayed in directory
875
-
- `[AccountEnabled <Boolean?>]`: true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, NOT, and in).
876
+
- `[AccountEnabled <Boolean?>]`: true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, NOT, and in). `-AccountEnabled $false` is ignored when changing the account's password.
876
877
- `[AgeGroup <String>]`: Sets the age group of the user. Allowed values: null, minor, notAdult and adult. Refer to the legal age group property definitions for further information. Supports $filter (eq, ne, NOT, and in).
877
878
- `[ApproximateLastSignInDateTime <DateTime?>]`: The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderBy.
878
879
- `[City <String>]`: The city in which the user is located. Maximum length is 128 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith).
@@ -916,7 +917,7 @@ To create the parameters described below, construct a hash table containing the
916
917
- `[(Any) <Object>]`: This indicates any property can be added to this object.
917
918
- `[ForceChangePasswordNextSignIn <Boolean?>]`: true if the user must change her password on the next login; otherwise false. If not set, default is false. NOTE: For Azure B2C tenants, set to false and instead use custom policies and user flows to force password reset at first sign in. See Force password reset at first logon.
918
919
- `[ForceChangePasswordNextSignInWithMfa <Boolean?>]`: If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false.
919
-
- `[Password <String>]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required.
920
+
- `[Password <String>]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. When changing the password using this method, AccountEnabled is set to true.
920
921
- `[PhysicalId <String[]>]`: For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith).
921
922
- `[PostalCode <String>]`: The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code. Maximum length is 40 characters. Supports $filter (eq, ne, NOT, ge, le, in, startsWith).
922
923
- `[PreferredLanguage <String>]`: The preferred language for the user. Should follow ISO 639-1 Code; for example en-US. Supports $filter (eq, ne, NOT, ge, le, in, startsWith).
@@ -933,7 +934,7 @@ To create the parameters described below, construct a hash table containing the
933
934
- `[(Any) <Object>]`: This indicates any property can be added to this object.
934
935
- `[ForceChangePasswordNextSignIn <Boolean?>]`: true if the user must change her password on the next login; otherwise false. If not set, default is false. NOTE: For Azure B2C tenants, set to false and instead use custom policies and user flows to force password reset at first sign in. See Force password reset at first logon.
935
936
- `[ForceChangePasswordNextSignInWithMfa <Boolean?>]`: If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false.
936
-
- `[Password <String>]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required.
937
+
- `[Password <String>]`: The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. When changing the password using this method, AccountEnabled is set to true.
0 commit comments