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 and groupId to determine if the specified user is in the specified group. If the answer is no, the response is an empty list.
  • AlthoughuserId and groupId are not individually required, you must set one of them.

Request Params

KeyDatatypeRequiredDescription
compartmentIdstring(Required) The OCID of the compartment (remember that the tenancy is simply the root compartment).
userIdstringThe OCID of the user.
groupIdstringThe OCID of the group.
pagestringThe value of the opc-next-page response header from the previous "List" call.
limitnumberThe maximum number of items to return in a paginated "List" call.

HEADERS

KeyDatatypeRequiredDescription
Datestring(Required) Current Date
Authorizationstring(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}]