How can I pull Azure AD Password Policies that are in Intune using Microsoft Graph API

vukile simelane 5 Reputation points
2023-01-16T07:27:29.9633333+00:00

I am using the Microsoft Graph API to get user details and it is not retrieving the password policies. The password policies are set and can be accessed via Intune and can see them via the UI. Is there a way I can access these password policies using Microsoft Graph API?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 42,511 Reputation points
    2023-01-16T09:46:18.2066667+00:00

    Hi,

    Yes it is possible - you can access user password policies using the Microsoft Graph API by making a GET request to the /directoryRoles/{id}/passwordPolicies endpoint, where {id} is the ID of the directory role for which you want to retrieve the password policy.

    Hope this helps.

    JS

    ==

    Please Accept the answer if the information helped you. This will help us and others in the community as well.

    GET https://graph.microsoft.com/v1.0/directoryRoles/{id}/passwordPolicies
    

  2. Mehtab Siddique (MINDTREE LIMITED) 971 Reputation points
    2023-02-08T06:05:52.0533333+00:00

    For fetching the password policy, you can also try the below query:

    Get: https://graph.microsoft.com/v1.0/users/a7f92ec2-bdc0-4af0-b911-593106c88c36?$select=displayName,passwordPolicies
    

    Details for password policy: https://learn.microsoft.com/en-us/graph/api/resources/passwordprofile?view=graph-rest-1.0


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.