Skip to content

Commit 05bc5aa

Browse files
author
Simonx Xu
authored
Merge pull request #9016 from AmandaAZ/Branch-CI5820
AB#5820: Convert blog post to article
2 parents 4fc46c2 + 7ec7df1 commit 05bc5aa

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

support/entra/entra-id/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@
299299
href: users-groups-entra-apis/delta-query-not-supported-for-aad-b2c-tenant.md
300300
- name: Handling errors in Graph API requests with Invoke-RestMethod
301301
href: app-integration/graph-api-error-handling-invoke-restmethod.md
302+
- name: Only one user is returned when running List users API
303+
href: users-groups-entra-apis/only-one-user-returned-by-microsoft-graph-list-users-api.md
302304
- name: Troubleshoot Authorization RequestDenied error
303305
href: app-integration/troubleshoot-authorization-requestdenied-graph-api.md
304306
- name: The memberOf API returns null values for properties
Loading
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Microsoft Graph List Users API Only Return One User
3+
description: Provides a solution to an issue where the Microsoft Graph REST API List users only returns one user in a directory.
4+
ms.date: 06/09/2025
5+
ms.service: entra-id
6+
ms.reviewer: bachoang, v-weizhu
7+
ms.custom: sap:Problem with querying or provisioning resources
8+
---
9+
# Microsoft Graph List users API only returns one user in a directory
10+
11+
This article provides a solution to an issue where the Microsoft Graph REST API [List users](/graph/api/user-list) only returns one user in a directory.
12+
13+
## Symptoms
14+
15+
Consider the following scenario:
16+
17+
- You sign in to [Microsoft Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) by selecting the profile icon at the top right.
18+
19+
:::image type="content" source="media/only-one-user-returned-by-microsoft-graph-list-users-api/microsoft-graph-explorer-sign-in.png" alt-text="Screenshot that shows the sign-in button in Microsoft Graph Explorer." lightbox="media/only-one-user-returned-by-microsoft-graph-list-users-api/microsoft-graph-explorer-sign-in.png":::
20+
21+
- After sign-in, you try to run this query `GET https://graph.microsoft.com/v1.0/users` to retrieve all users in your directory.
22+
23+
In this case, only one user is returned. The expected output is a list of multiple users from the directory.
24+
25+
:::image type="content" source="media/only-one-user-returned-by-microsoft-graph-list-users-api/list-users-query-result.png" alt-text="Screenshot that shows the query result." lightbox="media/only-one-user-returned-by-microsoft-graph-list-users-api/list-users-query-result.png":::
26+
27+
## Cause
28+
29+
This issue occurs because you sign in with a personal Microsoft account (MSA), as shown in the preceding screenshot. Personal accounts don't have access to organizational directory data in Microsoft Entra ID. As a result, the query only returns the user associated with the personal account.
30+
31+
## Solution
32+
33+
To retrieve all users in the directory, you must sign in to Microsoft Graph Explorer using an organizational Microsoft Entra account, such as `userPrincipalName = [email protected]`.
34+
35+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)