| title | List transitiveMemberOf |
|---|---|
| description | Get groups that the organizational contact is a member of. This API request is transitive, and will also return all groups the user is a nested member of. |
| author | dkershaw10 |
| ms.localizationpriority | medium |
| ms.subservice | entra-directory-management |
| doc_type | apiPageType |
| ms.date | 07/30/2024 |
Namespace: microsoft.graph
Get groups that this organizational contact is a member of. The API request is transitive, and returns all groups the organizational contact is a nested member of.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
Important
In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation.
- Directory Readers
- Global Reader
- Directory Writers
- Intune Administrator
- User Administrator
[!INCLUDE limited-info]
GET /contacts/{id}/transitiveMemberOfThis method supports the $filter, $count, $select, $search, and $top OData query parameters to help customize the response.
- OData cast is enabled. For example,
/contacts/{id}/transitiveMemberOf/microsoft.graph.groupretrieves only groups the contact is a member of, directly or indirectly. $searchis supported on the displayName property only.- The default and maximum page size is 100 and 999 group objects respectively.
- The use of query parameters with this API is supported only with advanced query parameters. For more information, see Advanced query capabilities on directory objects.
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Accept | application/json |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and a collection of directoryObject objects in the response body.
The following example shows a request.
GET https://graph.microsoft.com/v1.0/contacts/e63333f5-3d11-4026-8fe3-c0f7b044dd3a/transitiveMemberOf
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"@odata.type": "#microsoft.graph.group",
"id": "id-value",
"createdDateTime": null,
"description": "All users at the company",
"displayName": "All Users",
"groupTypes": [],
"mailEnabled": false,
"securityEnabled": true,
}
]
}