Update-EntraSignedInUserPassword
Updates the password for the signed-in user.
Syntax
Update-EntraSignedInUserPassword
-NewPassword <SecureString>
-CurrentPassword <SecureString>
[<CommonParameters>]
Description
The Update-EntraSignedInUserPassword
cmdlet updates the password for the signed-in user in Microsoft Entra ID.
Enable users to update their own passwords. Any user can change their password without requiring administrator privileges.
Examples
Example 1: Update a password
Connect-Entra -Scopes 'Directory.AccessAsUser.All'
$CurrentPassword = ConvertTo-SecureString '<strong-password>' -AsPlainText -Force
$NewPassword = ConvertTo-SecureString '<strong-password>' -AsPlainText -Force
$params = @{
CurrentPassword = $CurrentPassword
NewPassword = $NewPassword
}
Update-EntraSignedInUserPassword @params
This example shows how to update the password for the signed-in user.
-CurrentPassword
parameter specifies the current password of the signed-in user.-NewPassword
parameter specifies the new password for the signed-in user.
Parameters
-CurrentPassword
Specifies the current password of the signed-in user.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NewPassword
Specifies the new password for the signed-in user.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Notes
- For more information, see changePassword.