Fetch Manager from Azure AD via Graph API

Pankaj Singh 0 Reputation points
2023-10-18T08:27:23.18+00:00

Hi,

I am using the below query to fetch the manager details from Azure AD via Graph API but it never returns the manager although the Graph API documentation suggests Manager should be a part of the response. My response does not contain the manager attribute or its value.

https://graph.microsoft.com/v1.0/users?$select=id,userPrincipalName,jobTitle,surname,displayName,mail,employeeId,city,companyName,employeeLeaveDateTime,country,department,onPremisesDistinguishedName,accountEnabled,signInActivity,onPremisesSamAccountName,postalCode,officeLocation,manager,mailNickname,createdDateTime

Please advise.

Thanks

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,371 Reputation points
    2023-10-18T09:24:23.91+00:00

    Hi @Pankaj Singh

    The manager is not a basic attribute of the user and will not be returned by default. You can expand this attribute through the $expand query parameter.

    https://graph.microsoft.com/v1.0/users?$expand=manager&$select=id,userPrincipalName,jobTitle,surname,displayName,mail......
    

    User's image

    Hope this helps.

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


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.