You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get-AzADUser Does Not Return Password Policy #17839
Name Value
---------
PSVersion 7.2.2
PSEdition Core
GitCommitId 7.2.2
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
To answer the open question: the naming is intentional. -Select takes the Graph name passwordPolicies, and the generated Az.Resources model surfaces it as the singular PasswordPolicy on the output object, which is a model convention, not a defect.
The default-projection difference from the deprecated Get-AzureADUser is also expected, since Get-AzADUser follows Graph's default projection and needs -Select. The value is retrievable, so closing.
If -Select PasswordPolicies stops surfacing it on a current release, please reopen with your module version and -Debug output.
Activity
dingmeng-xue commentedon Apr 19, 2022
Thanks for reporting.
Yabo Hu (@VeryEarly) , please help look into this question.
VeryEarly commentedon Apr 19, 2022
Hi Dev Ramdin (@devramdin)
After trying following cmdlets
As you can see the passwordpolicy is not in the response. The API used by Get-AzADUser is https://graph.microsoft.com/v1.0/users/{objectid}
And the API used by Get-AzureADUser might be different.
devramdin commentedon Apr 19, 2022
Hi Yabo Hu (@VeryEarly),
Thanks for your response. The Debug switch helped me troubleshoot the issue.
The Graph API property name is PasswordPolicies but in Get-AzADUser it is PasswordPolicy.
This doesn't work:
Get-AzADUser -ObjectId XXXX -Select PasswordPolicies | Select-Object PasswordPolicies
This does:
Get-AzADUser -ObjectId XXXX -Select PasswordPolicies | Select-Object PasswordPolicy
Is the inconsistency intentional? The property name is PasswordPolicies in Get-AzureADUser which I am trying to migrate away from.
VeryEarly commentedon Apr 25, 2022
Hi Dev Ramdin (@devramdin) ,
Can you please share the response of
I tried run some tests but none of them have property "PasswordPolicies" or "PasswordPolicy"
devramdin commentedon Apr 25, 2022
Hi Yabo Hu (@VeryEarly),
Get-AzureADUser doesn't have Select as a parameter. It returns all the attributes by default including PasswordPolicies.
VeryEarly commentedon May 20, 2022
Sorry I didn't get your point, please share the response of whatever cmdlet you executed and successfully returned passwordpolicy
microsoft-github-policy-service commentedon Apr 10, 2026
🔔 Routing this issue to @act-identity-squad.
MaddyMicrosoft commentedon Oct 8, 2026
To answer the open question: the naming is intentional. -Select takes the Graph name passwordPolicies, and the generated Az.Resources model surfaces it as the singular PasswordPolicy on the output object, which is a model convention, not a defect.
The default-projection difference from the deprecated Get-AzureADUser is also expected, since Get-AzADUser follows Graph's default projection and needs -Select. The value is retrievable, so closing.
If -Select PasswordPolicies stops surfacing it on a current release, please reopen with your module version and -Debug output.