Skip to content

Misleading names of Set-EntraUserPassword and Set-EntraBetaUserPassword commands  #1155

Open
@alexandair

Description

@alexandair

Set-EntraUserPassword and Set-EntraBetaUserPassword commands are not changing user's password.
They are changing a password profile.
Accurate names should be Set-EntraUserPasswordProfile and Set-EntraBetaUserPasswordProfile

Parameter names are also misleading and not in sync with the property names they are changing.
Alias parameters should be created, if you want to be accurate, but also backward compatible with AzureAD.

PS> gcm Set-EntraUserPassword -Syntax      

Set-EntraUserPassword [-Password] <securestring> [[-ForceChangePasswordNextLogin] <bool>] [-ObjectId] <string> [[-EnforceChangePasswordPolicy] <bool>] [<CommonParameters>]
PS> (Get-EntraUser -Top 1).passwordprofile | gm -MemberType noteproperty

   TypeName: System.Management.Automation.PSCustomObject

Name                                 MemberType   Definition
----                                 ----------   ----------
forceChangePasswordNextSignIn        NoteProperty bool forceChangePasswordNextSignIn=True
forceChangePasswordNextSignInWithMfa NoteProperty bool forceChangePasswordNextSignInWithMfa=False
password                             NoteProperty object password=null
-ForceChangePasswordNextLogin --> -ForceChangePasswordNextSignIn
-EnforceChangePasswordPolicy --> -ForceChangePasswordNextSignInWithMfa
-ObjectId --> -UserId

Is there a reason to have -ForceChangePasswordNextLogin and -EnforceChangePasswordPolicy as Boolean instead of switch parameters?

Metadata

Metadata

Labels

P0Highest priorityenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions