Users - Get Member Groups

Gets a collection that contains the object IDs of the groups of which the user is a member.

POST https://graph.windows.net/{tenantID}/users/{objectId}/getMemberGroups?api-version=1.6

URI Parameters

Name In Required Type Description
tenantID
path True
  • string

The tenant ID.

objectId
path True
  • string

The object ID of the user for which to get group membership.

api-version
query True
  • string

Client API version.

Request Body

Media Types: "application/json", "text/json"

Name Required Type Description
securityEnabledOnly True
  • boolean

If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.

Responses

Name Type Description
200 OK

OK. The operation was successful.

Media Types: "application/json", "text/json"

Other Status Codes

Error response describing why the operation failed.

Media Types: "application/json", "text/json"

Definitions

GraphError

Active Directory error information.

UserGetMemberGroupsParameters

Request parameters for GetMemberGroups API call.

UserGetMemberGroupsResult

Server response for GetMemberGroups API call.

GraphError

Active Directory error information.

Name Type Description
odata.error.code
  • string

Error code.

odata.error.message.value
  • string

Error message value.

UserGetMemberGroupsParameters

Request parameters for GetMemberGroups API call.

Name Type Description
securityEnabledOnly
  • boolean

If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.

UserGetMemberGroupsResult

Server response for GetMemberGroups API call.

Name Type Description
value
  • string[]

A collection of group IDs of which the user is a member.