-
Notifications
You must be signed in to change notification settings - Fork 187
Update-MgUser Setting password forcechangepassword false bug report #3270
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
Comments
Hi @wongcc2012 please share the debug information by adding |
debug logging: PS C:\Users\Administrator\Desktop\MGUserPass-UAT> $UPN = "b-xxxxxx12a3@xxxxxxxsoft.com"
DEBUG: [CmdletBeginProcessing]: - Update-MgUser begin processing with parameterSet 'UpdateExpanded'. Confirm Confirm HTTP Method: Absolute Uri: Headers: Body: DEBUG: ============================ HTTP RESPONSE ============================ Status Code: Headers: Body: DEBUG: [CmdletEndProcessing]: - Update-MgUser end processing. |
sorry I am not sure about how to use Invoke-MgGraphRequest with the HTTP REST API. I only work on powershell commands |
Please update to the latest version 2.27.0 |
I have updated to v2.27.0 but it is still NOT working Below is the transcript Windows PowerShell transcript start Transcript started, output file is c:\PSLogging\PSGraphLog-MyTestTenant-20250421-234511.log Version Name Repository Description 2.0.2.182 AzureAD PSGallery Azure Active Directory V2 General Availability M... INFO: Now removing previous Non Graph API sessions Connecting to (MSOnline) service using admin@MyTestTenant.onmicrosoft.com admin@MyTestTenant.onmicrosoft.com AzureCloud 57bc67d6-896b-4491-962b-d21488f13931 57bc67d6-896b-4491-962b-d21488f13931 Connected via apponly access using 10fde85e-e0c5-4442-bfe9-352c7b8ded47 NOTE: You can use the -NoWelcome parameter to suppress this message. PS C:\Users\Administrator\Desktop\PS-O365-UAT> Get-MgUser DisplayName Id Mail #00-20241203a af35eb19-73a5-4a17-9b3e-cbcc21b0321e 20241203a@MyTestTenant.onmicros... PS C:\Users\Administrator\Desktop\PS-O365-UAT> $UPN = "a20250421a@MyTestTenant.onmicrosoft.com" HTTP Method: Absolute Uri: Headers: Body: Status Code: Headers: Body: Windows PowerShell transcript end |
Describe the bug
When user signin, user forced to change password (your password is expired...)
Expected behavior
User sign in to O365 services without changing password.
How to reproduce
$UserPassProfile = @{
Password = $_.UserPass #Define password IN CSV file
ForceChangePasswordNextSignIn = $False #Change password True or False
}
Update-MgUser -UserId $_.UPN -PasswordProfile $UserPassProfile
(Setting a pre-defined password for a $UPN user, without enforced user change password when next sign in)
SDK Version
2.26.1
Latest version known to work for scenario above?
2.25.0
Known Workarounds
uninstall all graph.api powershell modules, install a older version
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: