Information about Employees

Sneh Swaroop 1 Reputation point Microsoft Employee
2022-09-21T06:30:18.987+00:00

Hi,

Using the API, we want to fetch employees data (specifically, Birth Date and Date of Joining) under a specific org/manager for an internal project.
Can you please help us with the API that we can use for this ?

Thanks,
Sneh

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,859 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 41,936 Reputation points
    2022-09-21T07:26:23.047+00:00

    Hi,

    Can you try in the Microsoft Graph below query and this contains hire date but I dont see Birth Date as an attribute.

    https://graph.microsoft.com/v1.0/users/?$select=userPrincipalName,givenName,surname,businessPhones,officeLocation,companyName,Employeehiredate&$top=998

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

    0 comments No comments

  2. CarlZhao-MSFT 37,786 Reputation points
    2022-09-21T09:12:46.463+00:00

    Hi @Sneh Swaroop

    You may need multiple api calls. First list all employees under a specific manager, then get birthday and join time based on employee's user id.

    GET https://graph.microsoft.com/v1.0/{manager user id}/directReports  
    GET https://graph.microsoft.com/v1.0/users/{employee user id}?$select=birthday,createdDateTime,employeeHireDate  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.