ListUserGroupMemberships
GET {{baseUrl}}/userGroupMemberships/?compartmentId={{tenancy_ocid}}&userId={{user_ocid}}&limit=693
Lists the UserGroupMembership
objects in your tenancy. You must specify your tenancy's OCID
as the value for the compartment ID
(see Where to Get the Tenancy's OCID and User's OCID).
You must also then filter the list in one of these ways:
- You can limit the results to just the memberships for a given user by specifying a
userId
. - Similarly, you can limit the results to just the memberships for a given group by specifying a
groupId
. - You can set both the
userId
andgroupId
to determine if the specified user is in the specified group. If the answer is no, the response is an empty list. - Although
userId
andgroupId
are not individually required, you must set one of them.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
compartmentId | string | (Required) The OCID of the compartment (remember that the tenancy is simply the root compartment). | |
userId | string | The OCID of the user. | |
groupId | string | The OCID of the group. | |
page | string | The value of the opc-next-page response header from the previous "List" call. | |
limit | number | The maximum number of items to return in a paginated "List" call. | |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Date | string | (Required) Current Date | |
Authorization | string | (Required) Signature Authentication on Authorization header |
RESPONSES
status: OK
[{"id":"ullamco ipsum cupidatat exercitation","compartmentId":"exercitation","timeCreated":"1982-11-10T07:23:13.073Z","lifecycleState":"DELETING","groupId":"pariatur dolor amet","userId":"esse","inactiveStatus":-24062913},{"id":"qui in est aliquip","compartmentId":"proident reprehenderit culpa","timeCreated":"1960-12-08T05:35:40.840Z","lifecycleState":"ACTIVE","groupId":"qui fugiat quis","userId":"irure consectet","inactiveStatus":-24151527}]