Check for membership in the specified list of groups. Returns from the list those groups of which the user has a direct or transitive membership.

You can check up to a maximum of 20 groups per request. This function supports Office 365 and other types of groups provisioned in Azure AD. Note that Office 365 Groups cannot contain groups. So membership in an Office 365 Group is always direct.


One of the following scopes is required to execute this API: User.Read.All; User.ReadWrite.All; Directory.Read.All; Directory.ReadWrite.All; Directory.AccessAsUser.All

HTTP request

POST /users/{id | userPrincipalName}/checkMemberGroups

Request headers

Header Value
Authorization Bearer . Required.
Content-Type application/json

Request body

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

Parameter Type Description
groupIds String An array of group ids


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


Here is an example of how to call this API.


Here is an example of the request.

Content-type: application/json
Content-length: 44

  "groupIds": [

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

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

  "value": [