Skip to content

Add a group

Request

OAuth 2.0 scope:
  • okta.groups.manage

Adds a new group with the OKTA_GROUP type to your org.

Note: App import operations are responsible for syncing groups with APP_GROUP type such as Active Directory groups. See About groups in the help documentation.

Bodyapplication/jsonrequired
profileobject(OktaUserGroupProfile)

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.

curl -i -X POST \
  https://subdomain.okta.com/api/v1/groups \
  -H 'Content-Type: application/json' \
  -d '{
    "profile": {
      "description": "All users West of The Rockies",
      "name": "West Coast users"
    }
  }'

Responses

Success

Bodyapplication/json
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

Example of a group

{ "id": "00g1emaKYZTWRYYRRTSK", "created": "2015-02-06T10:11:28.000Z", "lastUpdated": "2015-10-05T19:16:43.000Z", "lastMembershipUpdated": "2015-11-28T19:15:32.000Z", "objectClass": [ "okta:user_group" ], "type": "OKTA_GROUP", "profile": { "name": "West Coast users", "description": "All users West of The Rockies" }, "_links": { "logo": [ … ], "users": { … }, "apps": { … } } }