Changing a user password
This recipe outlines the procedure for changing a user’s password in Microsoft 365, ensuring that you can manage user access and maintain security standards within your organization efficiently.
Getting ready
Follow the guidance in the Setting up PowerShell recipe from Chapter 1, Microsoft 365 Setup and Basic Administration, to connect to your Microsoft 365 tenant via PowerShell.
Ensure you have administrative privileges on your system, as well as administrative permissions to modify user profiles in your Microsoft 365 tenant such as User Administrator or Global Administrator.
Important note
Elevating privileges in a production environment requires careful consideration. You must have the appropriate API permissions and consent granted by an administrator for the following scope: Connect-MgGraph -
Scopes "Directory.AccessAsUser.All"
.
Before proceeding, ensure that your organization’s security policies allow for this...