Forum Discussion
tcboeira
Dec 21, 2023Brass Contributor
Enable Password Expiration - Update-MgUser -PasswordPolicies None does not work
Hello, good morning everyone! I hope all is well with everyone. Well, I need to activate the option to force passwords to expire every period. I used the Admin Center for this. However, I not...
juliansperling
Dec 22, 2023Brass Contributor
Just for Clarification, you mean that users have to change their password every for example 6 months? Which is not recommended (https://learn.microsoft.com/en-us/microsoft-365/admin/misc/password-policy-recommendations?view=o365-worldwide#password-expiration-requirements-for-users)? I presume you removed the checkmark to set password to never expire and added a maximum lifetime.
Aside from that, Have you tried
Invoke-MgGraphRequest PATCH -Uri '/v1.0/users/<UserID>' -body @{ passwordPolicies = $null }