| title | orgContact: List memberOf |
|---|---|
| description | Retrieve the list of groups and adminstrative units the contact is a member of. |
| ms.localizationpriority | medium |
| author | dkershaw10 |
| ms.subservice | entra-directory-management |
| doc_type | apiPageType |
| ms.date | 11/06/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Retrieve the list of groups and adminstrative units the contact is a 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}/memberOfThis 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}/memberOf/microsoft.graph.groupretrieves only groups the contact is a member of. $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.
| Name | Type | Description |
|---|---|---|
| Authorization | string | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and collection of directoryObject objects in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/contacts/{id}/memberOf
[!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": [
{
"id": "id-value"
}
]
}