Use this PowerShell command: Get-MgUser -All | Where {$_.PasswordPolicies -contains "DisablePasswordExpiration"}