Number of employees for a tenant

Gambhir Kunwar 20 Reputation points Microsoft Employee

Context: Our team is working on provisioning for a product. We need to make Graph calls.

Our team needs to get a number of employees for a tenant provisioning. We're using GET /users/$count endpoint using a bearer token. We tested with Microsoft and got more employees (like ~over 1 million). Is this correct? Is MS Graph counting all the employees since the company established? According to Linkedln as of today, it shows 231,237 employees for Microsoft (publicly available on Linkedln)

Questions: Is there a way to get count of just the active employees in MS Graph?

Or if thats not an option, could we use #seats i.e license count from the subscribed skus endpoint GET /subscribedSkus?


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

1 answer

Sort by: Most helpful
  1. Sayantan Ganguly 1,145 Reputation points

    Hello Gambhir Kunwar,

    Thanks for reaching out!

    Yes, you can retrieve the count of active employees in Microsoft Graph by using the /$count endpoint with a specific filter. The /users/$count endpoint without any filter will return the total count of all users in the tenant, including both active and inactive users.

    To get the count of active employees, you can apply a filter based on the user's account status. You can use the accountEnabled property to filter out the inactive users. The request would look something like this:

    GET /users/$count?$filter=accountEnabled eq true

    This will return the count of active employees in your tenant.

    Regarding your second question, using the license count from the /subscribedSkus endpoint is not the recommended approach for getting the count of active employees. The subscribedSkus endpoint provides information about the licenses assigned to users, but it does not directly indicate the active user count. It's possible for users to have assigned licenses without being active users in the system.

    Using the /users/$count endpoint with the appropriate filter is the recommended way to get the count of active employees in Microsoft Graph.

    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.