Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexandair opened this issue Oct 16, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request P0 Highest priority

Comments

@alexandair
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P0 Highest priority
Projects
None yet
Development

No branches or pull requests

3 participants