How to set the password to never expire for all the users on office365

There could be a requirement when you want to set the users password to never expire on office365. The setting for In-cloud accounts is controlled using Set-msoluser command. Please make sure before you set the password for the users to never expire, all users are enabled for Two Factor Authentication (2FA). You can create a conditional access (CA) policy which requires 2FA when anyone access the Cloud resources which will protect the user accounts. First you should check PasswordNeverExpires attribute for the users before you make any changes to it. Also, you will need to connect to connect-msolservice using Global Administrator account or the account which has the rights to …

Read more