orgContact: getMemberObjects

Return all the groups that this organizational contact is a member of. The check is transitive. Organizational contacts cannot be members of directory roles. No directory roles will be returned.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) OrgContact.Read.All and Group.Read.All, Directory.Read.All
Delegated (personal Microsoft account) Not supported.
Application OrgContact.Read.All and Group.Read.All, Directory.Read.All

HTTP request

POST /contacts/{id}/getMemberObjects

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-type application/json. Required.

Request body

In the request body, provide a JSON object with the following parameters.

Parameter Type Description
securityEnabledOnly Boolean Set to false. Returning only security-enabled groups is supported for users only.

Response

If successful, this method returns a 200 OK response code and a String collection object in the response body.

Example

Request

The following is an example of the request.

POST https://graph.microsoft.com/v1.0/contacts/{id}/getMemberObjects
Content-type: application/json
Content-length: 33

{
  "securityEnabledOnly": false
}
Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 39

{
  "value": [
    "groupID-value1"
  ]
}