Skip to content

List all admin role group targets

Request

OAuth 2.0 scope:
  • okta.roles.read

Lists all group targets for a USER_ADMIN, HELP_DESK_ADMIN, or GROUP_MEMBERSHIP_ADMIN role assignment to an admin user. If the role isn't scoped to specific group targets, an empty array [] is returned.

Path
userIdstringrequired

ID of an existing Okta user

Example:00ub0oNGTSWTBKOLGLNR
roleAssignmentIdstringrequired

The id of the role assignment

Example:JBCUYUC7IRCVGS27IFCE2SKO
Query
afterstring

The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination and Link header.

limitinteger, [ 1 .. 20 ]

A limit on the number of objects to return

Default:20
curl -i -X GET \
  'https://subdomain.okta.com/api/v1/users/00ub0oNGTSWTBKOLGLNR/roles/JBCUYUC7IRCVGS27IFCE2SKO/targets/groups?after=string&limit=20'

Responses

Success

Bodyapplication/json
Array [
createdstring, (date-time)read-only

Timestamp when the group was created

idstringread-only

Unique ID for the group

Example:"0gabcd1234"
lastMembershipUpdatedstring, (date-time)read-only

Timestamp when the groups memberships were last updated

lastUpdatedstring, (date-time)read-only

Timestamp when the group's profile was last updated

objectClassArray of stringsread-only

Determines the group's profile

profileOktaUserGroupProfile (object) or OktaActiveDirectoryGroupProfile (object)(GroupProfile)
Any of:

Profile for any group that is not imported from Active Directory. Specifies the standard and custom profile properties for a group.

The objectClass for these groups is okta:user_group.

You can extend group profiles with custom properties, but you must first add the properties to the group profile schema before you can reference them. Use the Profile Editor in the Admin Console or the Schemas API to manage schema extensions.

Custom properties can contain HTML tags. It is the client's responsibility to escape or encode this data before displaying it. Use best-practices to prevent cross-site scripting.

typestring(GroupType)

Determines how a group's profile and memberships are managed

Enum ValueDescription
APP_GROUP

Group profile and memberships are imported and must be managed within the app (such as Active Directory or LDAP) that imported the group

BUILT_IN

Group profile and memberships are managed by Okta and can't be modified

OKTA_GROUP

Group profile and memberships are directly managed in Okta via static assignments or indirectly through group rules

_embeddedobjectread-only

Embedded resources related to the group

]
Response
[ { "created": "2019-08-24T14:15:22Z", "id": "0gabcd1234", "lastMembershipUpdated": "2019-08-24T14:15:22Z", "lastUpdated": "2019-08-24T14:15:22Z", "objectClass": [ … ], "profile": { … }, "type": "APP_GROUP", "_embedded": { … }, "_links": { … } } ]