Skip to content

Commit 63c9966

Browse files
author
Simonx Xu
authored
Merge pull request #8529 from AmandaAZ/Branch-CI4609
AB#4609: Convert blog post to article
2 parents a78b71b + b7d69d1 commit 63c9966

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

support/entra/entra-id/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@
279279
href: app-integration/404-not-found-error-manage-objects-microsoft-graph.md
280280
- name: Use managed identities to call Graph APIs in VB.Net and C#
281281
href: users-groups-entra-apis/call-graph-api-using-managed-dentities.md
282+
- name: The memberOf API returns null values for properties
283+
href: users-groups-entra-apis/memberof-api-returns-null-properties.md
282284
- name: Getting access denied errors (Authorization)
283285
items:
284286
- name: Add an owner to an application
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Microsoft Graph API MemberOf Returns Null Values for Properties
3+
description: Provides a solution to an issue where some properties are indicated as null when you call the Microsoft Graph API memberOf.
4+
ms.date: 04/03/2025
5+
ms.service: entra-id
6+
ms.reviewer: bhvootla, adoyle, nualex, v-weizhu
7+
ms.custom: sap:Problem with querying or provisioning resources
8+
---
9+
# Microsoft Graph API memberOf returns null values for some properties
10+
11+
This article provides a solution to an issue where some properties are indicated as `null` when you call the Microsoft Graph API `memberOf`.
12+
13+
## Symptoms
14+
15+
When calling one of the following APIs that can return the list of groups and directory roles that a user is a direct member of, you see `null` values for all properties except the object type and ID in the JSON response:
16+
17+
```msgraph
18+
GET https://graph.microsoft.com/v1.0/me/memberOf
19+
```
20+
21+
```msgraph
22+
GET https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/memberOf
23+
```
24+
25+
Here's a sample JSON response:
26+
27+
```json
28+
{
29+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
30+
"value": [
31+
{
32+
"@odata.type": "#microsoft.graph.group",
33+
"id": "00000003-0000-0000-c000-000000000000",
34+
"deletedDateTime": null,
35+
"classification": null,
36+
"createdDateTime": null,
37+
"creationOptions": [],
38+
"description": null,
39+
"displayName": null,
40+
"expirationDateTime": null,
41+
"groupTypes": [],
42+
"isAssignableToRole": null,
43+
"mail": null,
44+
"mailEnabled": null,
45+
"mailNickname": null,
46+
"membershipRule": null,
47+
"membershipRuleProcessingState": null
48+
}
49+
]
50+
}
51+
```
52+
53+
## Cause
54+
55+
When an application queries the membership that returns a `directoryObject` type collection, if it doesn't have permission to read a resource type, members of that type are returned with limited information. For example, only the object type and ID might be returned, and other properties are indicated as null. Complete information is returned for the object types that the application has permission to read.
56+
57+
For more information, see [List a user's direct memberships](/graph/api/user-list-memberof) and [Limited information returned for inaccessible member objects](/graph/permissions-overview#limited-information-returned-for-inaccessible-member-objects).
58+
59+
## Solution
60+
61+
To get complete information, configure at least the `Directory.Read.All` permission for your application.
62+
63+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)