Enable Password Expiration - Update-MgUser -PasswordPolicies None does not work

Brass Contributor

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 noticed that the accounts always remain this way

UserPrincipalName // PasswordNeverExpires
email address removed for privacy reasons // False


I get the impression that the accounts will not expire the passwords as I wish.

I use the command
Update-MgUser –UserId <account id> -PasswordPolicies None
but absolutely nothing happens.


I really need to activate this. Is there an internal case that I can resolve or that requires intervention from MS Support?

1 Reply

@tcboeira 

Just for Clarification, you mean that users have to change their password every for example 6 months? Which is not recommended (Even by Microsoft)? 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 }