We’d previously set up a client with an Azure Active Directory B2C, and now we were receiving complaints about the clients’ passwords expiring.
To remedy this, we needed to change the password policy, and not just for one or two users but for all the users. The quickest method was to use the Azure Active Directory PowerShell for Graph module which can be found here. The link explains how to install this module using PowerShellGet.
This module allows you to perform a variety of actions on your Azure Active Directory from the PowerShell command line. For a full list of cmdlets available please check the Microsoft doc.
Once installed we need to enter our credentials. This is fairly straightforward. Run the following:
This opens a popup to enter your global administrator or user administrator account details.
Now to connect to your tenant, by running the following:
Now if you want to check the Password Policies of all your users, you’ll want to pipe it to a csv file so it’s actually workable, where <<Path>> is the path to your csv file you want to save the information to:
Now, once you’re sure that this is the correct group of portal users, you can update the Password Policies, remembering that you may need to keep a previous policy, in our case Disable Strong Password, so simply add the new policy after the initial policies.
Depending on the number of users this could take a while, so grab a coffee, switch on Netflix and relax. Or maybe set it running before you head home.