The following request gets a list of the user groups to which a specific
user belongs.
Execution permission
You must be a system administrator or a security administrator.
Request line
GET base-URL/security/v1/users/object-ID-of-the-user/user-groups
Request message
Response message
- Body
-
[ { "id": "4760d4c0-c593-42fe-b44a-553da4793882", "name": "opscenter-administrators", "path": "/opscenter-administrators", "dn": null, "description": null, "builtin": true, "essential": false, "external": false }, { "id": "7a773ca8-49cf-4ee2-9456-eb4853b4c6c1", "name": "opscenter-users", "path": "/opscenter-users", "dn": null, "description": null, "builtin": true, "essential": true, "external": false } ]
Attribute
Type
Description
id
string
Object ID of the user group
name
string
User group name
path
string
Path
dn
string
Distinguished Name
If the group is not a group imported from the Active Directory server, the value null is always returned.
description
string
Description of the user group
builtin
boolean
Whether the user group is a built-in user group
- true: The user group is a built-in user group.
- false: The user group is not a built-in user group.
essential
boolean
Whether the user group is an essential user group (opscenter-users)
- true: The user group is an essential user group.
- false: The user group is not an essential user group.
external
boolean
Whether the user group was imported from an external source
- true: The user group was imported from an external source.
- false: The user group was not imported from an external source.
Coding example
curl -v -X GET -s "https://example.com:443/portal/security/v1/users/a010279b-ae66-4c1d-b066-c45d50c9f75a/user-groups" -H "Authorization:Bearer eyJhbxxx"
Tip: Because this request uses SSL
communication, you must either run the curl command with the root
certificate of the Common Services server certificate
specified for the --cacert option, or run the command with the
-k option specified. (The -k option runs the command by
ignoring SSL errors.)