https://learn.microsoft.com/en-us/powershell/module/azuread/get-azureaduser?view=azureadps-2.0 https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/set-password-to-never-expire?view=o365-worldwide You must call the Connect-AzureAD cmdlet before calling any other cmdlets PS /home/admin> Connect-AzureAD To set the passwords of all the users in an organization to never expire, run the following cmdlet: Get-AzureADUser -All $true | Set-AzureADUser -PasswordPolicies DisablePasswordExpiration User accounts configured with the -PasswordPolicies DisablePasswordExpiration parameter still age based on the pwdLastSet attribute