Skip to content

List all groups

Request

CORS
OAuth 2.0 scope:
  • okta.users.read

Lists all groups of which the user is a member

Note: To list all groups in your org, use the List all groups endpoints in the Groups API.

Path
idstringrequired

An ID, login, or login shortname (as long as the shortname is unambiguous) of an existing Okta user

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, <= 200

A limit on the number of objects to return

Default:200
curl -i -X GET \
  'https://subdomain.okta.com/api/v1/users/{id}/groups?after=string&limit=200'

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
[ { "id": "0gabcd1234", "profile": { … } }, { "id": "0gefgh5678", "profile": { … } } ]