GET /api/v1/groups

Lists all groups with pagination support.

Note: To list all groups belonging to a member, use the List all groups endpoint in the User Resources API.

The number of groups returned depends on the specified limit, if you have a search, filter, and/or query parameter set, and if that parameter is not null. We recommend using a limit less than or equal to 200.

A subset of groups can be returned that match a supported filter expression, query, or search criteria.

Note: The search parameter results are sourced from an eventually consistent datasource and may not reflect the latest information.

Servers

Query parameters

Name Type Required Description
sortOrder String No

Specifies sort order: asc or desc (for search queries only). This parameter is ignored if sortBy isn't present.

Default value: "asc"

limit Integer No

Specifies the number of group results in a page.

Okta recommends using a specific value other than the default or maximum. If your request times out, retry your request with a smaller limit and page the results.

The Okta default Everyone group isn't returned for users with a group admin role.

filter String No

Filter expression for groups. See Filter.

Filtering supports the following limited number of properties: id, type, lastUpdated, and lastMembershipUpdated.

Note: All filters must be URL encoded. For example, filter=lastUpdated gt "2013-06-01T00:00:00.000Z" is encoded as filter=lastUpdated%20gt%20%222013-06-01T00:00:00.000Z%22. See Special characters.

sortBy String No

Specifies the field to sort by (for search queries only). sortBy can be any single property, for example sortBy=profile.name. Groups with the same value for the sortBy property are ordered by id'. Use with sortOrder to control the order of results.

q String No

Finds a group that matches the name property.

Note: Paging and searching are currently mutually exclusive. You can't page a query. The default limit for a query is 300 results. Query is intended for an auto-complete picker use case where users refine their search string to constrain the results.

after String No

Specifies the pagination cursor for the next page of groups. The after cursor should be treated as an opaque value and obtained through the next link relation. See Pagination.

search String No

Searches for groups with a supported filtering expression for all properties except for _embedded, _links, and objectClass. Okta recommends this query parameter because it provides the largest range of search options and optimal performance.

This operation supports pagination.

Using search requires URL encoding, for example, search=type eq "OKTA_GROUP" is encoded as search=type+eq+%22OKTA_GROUP%22.

This operation searches many properties:

  • Any group profile attribute, including imported app group profile attributes.
  • The top-level properties: id, created, lastMembershipUpdated, lastUpdated, and type.
  • The source of groups with type of APP_GROUP, accessed as source.id.

You can also use the sortBy and sortOrder parameters.

Searches for groups can be filtered by the following operators: sw, eq, and co. You can only use co with these select profile attributes: profile.name and profile.description. See Operators.

expand String No

If specified, additional metadata is included in the response. Possible values are stats and app. This additional metadata is listed in the _embedded property of the response.

Note: You can use the stats value to return the number of users within a group. This is listed as the _embedded.stats.usersCount value in the response. See this Knowledge Base article for more information and an example.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.