> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# okta-groups

> Okta Groups - manage groups, ownership, and rules

**Server path:** `/okta-groups` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                                    | Description                  |
| ------------------------------------------------------------------------------------------------------- | ---------------------------- |
| [`okta-groups_activate_group_rule`](#okta-groups_activate_group_rule)                                   | Activate a group rule        |
| [`okta-groups_add_group`](#okta-groups_add_group)                                                       | Add a group                  |
| [`okta-groups_assign_group_owner`](#okta-groups_assign_group_owner)                                     | Assign a group owner         |
| [`okta-groups_assign_user_to_group`](#okta-groups_assign_user_to_group)                                 | Assign a user to a group     |
| [`okta-groups_create_group_rule`](#okta-groups_create_group_rule)                                       | Create a group rule          |
| [`okta-groups_deactivate_group_rule`](#okta-groups_deactivate_group_rule)                               | Deactivate a group rule      |
| [`okta-groups_delete_group`](#okta-groups_delete_group)                                                 | Delete a group               |
| [`okta-groups_delete_group_owner`](#okta-groups_delete_group_owner)                                     | Delete a group owner         |
| [`okta-groups_delete_group_rule`](#okta-groups_delete_group_rule)                                       | Delete a group rule          |
| [`okta-groups_get_group`](#okta-groups_get_group)                                                       | Retrieve a group             |
| [`okta-groups_get_group_rule`](#okta-groups_get_group_rule)                                             | Retrieve a group rule        |
| [`okta-groups_list_assigned_applications_for_group`](#okta-groups_list_assigned_applications_for_group) | List all assigned apps       |
| [`okta-groups_list_group_owners`](#okta-groups_list_group_owners)                                       | List all group owners        |
| [`okta-groups_list_group_rules`](#okta-groups_list_group_rules)                                         | List all group rules         |
| [`okta-groups_list_group_users`](#okta-groups_list_group_users)                                         | List all member users        |
| [`okta-groups_list_groups`](#okta-groups_list_groups)                                                   | List all groups              |
| [`okta-groups_replace_group`](#okta-groups_replace_group)                                               | Replace a group              |
| [`okta-groups_replace_group_rule`](#okta-groups_replace_group_rule)                                     | Replace a group rule         |
| [`okta-groups_unassign_user_from_group`](#okta-groups_unassign_user_from_group)                         | Unassign a user from a group |

***

## okta-groups\_activate\_group\_rule

Activate a group rule

**Parameters:**

| Parameter     | Type   | Required | Default | Description                |
| ------------- | ------ | -------- | ------- | -------------------------- |
| `groupRuleId` | string | Yes      | —       | The `id` of the group rule |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupRuleId": {
        "type": "string",
        "description": "The `id` of the group rule"
      }
    },
    "required": [
      "PCID",
      "groupRuleId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_add\_group

Add a group

**Parameters:**

| Parameter | Type   | Required | Default | Description  |
| --------- | ------ | -------- | ------- | ------------ |
| `body`    | object | Yes      | —       | Request body |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "body": {
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "body"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_assign\_group\_owner

Assign a group owner

**Parameters:**

| Parameter | Type   | Required | Default | Description                  |
| --------- | ------ | -------- | ------- | ---------------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group        |
| `id`      | string | No       | —       | The `id` of the group owner  |
| `type`    | string | No       | —       | The entity type of the owner |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "id": {
        "type": "string",
        "description": "The `id` of the group owner"
      },
      "type": {
        "type": "string",
        "description": "The entity type of the owner",
        "enum": [
          "GROUP",
          "USER"
        ]
      }
    },
    "required": [
      "PCID",
      "groupId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_assign\_user\_to\_group

Assign a user to a group

**Parameters:**

| Parameter | Type   | Required | Default | Description                 |
| --------- | ------ | -------- | ------- | --------------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group       |
| `userId`  | string | Yes      | —       | ID of an existing Okta user |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "userId": {
        "type": "string",
        "description": "ID of an existing Okta user"
      }
    },
    "required": [
      "PCID",
      "groupId",
      "userId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_create\_group\_rule

Create a group rule

**Parameters:**

| Parameter    | Type   | Required | Default | Description                              |
| ------------ | ------ | -------- | ------- | ---------------------------------------- |
| `actions`    | object | No       | —       | Defines which users and groups to assign |
| `conditions` | object | No       | —       | Defines group rule conditions            |
| `name`       | string | No       | —       | Name of the group rule                   |
| `type`       | string | No       | —       | The type value                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "actions": {
        "type": "object",
        "description": "Defines which users and groups to assign",
        "properties": {
          "assignUserToGroups": {
            "type": "object",
            "description": "Contains the `groupIds` array"
          }
        }
      },
      "conditions": {
        "type": "object",
        "description": "Defines group rule conditions",
        "properties": {
          "expression": {
            "type": "object",
            "description": "Defines Okta specific [group-rules expression](https://developer.okta.com/docs/reference/okta-expression-language/#expressions-in-group-rules)"
          },
          "people": {
            "type": "object",
            "description": "Defines conditions for `people` in a group rule"
          }
        }
      },
      "name": {
        "type": "string",
        "description": "Name of the group rule"
      },
      "type": {
        "type": "string",
        "description": "The type value",
        "enum": [
          "group_rule"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_deactivate\_group\_rule

Deactivate a group rule

**Parameters:**

| Parameter     | Type   | Required | Default | Description                |
| ------------- | ------ | -------- | ------- | -------------------------- |
| `groupRuleId` | string | Yes      | —       | The `id` of the group rule |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupRuleId": {
        "type": "string",
        "description": "The `id` of the group rule"
      }
    },
    "required": [
      "PCID",
      "groupRuleId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_delete\_group

Delete a group

**Parameters:**

| Parameter | Type   | Required | Default | Description           |
| --------- | ------ | -------- | ------- | --------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      }
    },
    "required": [
      "PCID",
      "groupId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_delete\_group\_owner

Delete a group owner

**Parameters:**

| Parameter | Type   | Required | Default | Description                 |
| --------- | ------ | -------- | ------- | --------------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group       |
| `ownerId` | string | Yes      | —       | The `id` of the group owner |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "ownerId": {
        "type": "string",
        "description": "The `id` of the group owner"
      }
    },
    "required": [
      "PCID",
      "groupId",
      "ownerId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_delete\_group\_rule

Delete a group rule

**Parameters:**

| Parameter     | Type    | Required | Default | Description                                                       |
| ------------- | ------- | -------- | ------- | ----------------------------------------------------------------- |
| `groupRuleId` | string  | Yes      | —       | The `id` of the group rule                                        |
| `removeUsers` | boolean | No       | —       | If set to `true`, removes users from groups assigned by this rule |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupRuleId": {
        "type": "string",
        "description": "The `id` of the group rule"
      },
      "removeUsers": {
        "type": "boolean",
        "description": "If set to `true`, removes users from groups assigned by this rule"
      }
    },
    "required": [
      "PCID",
      "groupRuleId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_get\_group

Retrieve a group

**Parameters:**

| Parameter | Type   | Required | Default | Description           |
| --------- | ------ | -------- | ------- | --------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      }
    },
    "required": [
      "PCID",
      "groupId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_get\_group\_rule

Retrieve a group rule

**Parameters:**

| Parameter     | Type   | Required | Default | Description                                                                              |
| ------------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------- |
| `groupRuleId` | string | Yes      | —       | The `id` of the group rule                                                               |
| `expand`      | string | No       | —       | If specified, returns the mapping of group IDs to group names in the `_embedded` object. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupRuleId": {
        "type": "string",
        "description": "The `id` of the group rule"
      },
      "expand": {
        "type": "string",
        "description": "If specified, returns the mapping of group IDs to group names in the `_embedded` object.",
        "enum": [
          "groupIdToGroupNameMap"
        ]
      }
    },
    "required": [
      "PCID",
      "groupRuleId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_list\_assigned\_applications\_for\_group

List all assigned apps

**Parameters:**

| Parameter | Type    | Required | Default | Description                                               |
| --------- | ------- | -------- | ------- | --------------------------------------------------------- |
| `groupId` | string  | Yes      | —       | The `id` of the group                                     |
| `after`   | string  | No       | —       | Specifies the pagination cursor for the next page of apps |
| `limit`   | integer | No       | —       | Specifies the number of app results for a page            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "after": {
        "type": "string",
        "description": "Specifies the pagination cursor for the next page of apps"
      },
      "limit": {
        "type": "integer",
        "description": "Specifies the number of app results for a page"
      }
    },
    "required": [
      "PCID",
      "groupId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_list\_group\_owners

List all group owners

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                   |
| --------- | ------- | -------- | ------- | ----------------------------------------------------------------------------- |
| `groupId` | string  | Yes      | —       | The `id` of the group                                                         |
| `search`  | string  | No       | —       | SCIM filter expression for group owners. Allows you to filter owners by type. |
| `after`   | string  | No       | —       | Specifies the pagination cursor for the next page of owners                   |
| `limit`   | integer | No       | —       | Specifies the number of owner results in a page                               |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "search": {
        "type": "string",
        "description": "SCIM filter expression for group owners. Allows you to filter owners by type."
      },
      "after": {
        "type": "string",
        "description": "Specifies the pagination cursor for the next page of owners"
      },
      "limit": {
        "type": "integer",
        "description": "Specifies the number of owner results in a page"
      }
    },
    "required": [
      "PCID",
      "groupId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_list\_group\_rules

List all group rules

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                              |
| --------- | ------- | -------- | ------- | ---------------------------------------------------------------------------------------- |
| `limit`   | integer | No       | —       | Specifies the number of rule results in a page                                           |
| `after`   | string  | No       | —       | Specifies the pagination cursor for the next page of rules                               |
| `search`  | string  | No       | —       | Specifies the keyword to search rules for                                                |
| `expand`  | string  | No       | —       | If specified, returns the mapping of group IDs to group names in the `_embedded` object. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "limit": {
        "type": "integer",
        "description": "Specifies the number of rule results in a page"
      },
      "after": {
        "type": "string",
        "description": "Specifies the pagination cursor for the next page of rules"
      },
      "search": {
        "type": "string",
        "description": "Specifies the keyword to search rules for"
      },
      "expand": {
        "type": "string",
        "description": "If specified, returns the mapping of group IDs to group names in the `_embedded` object.",
        "enum": [
          "groupIdToGroupNameMap"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_list\_group\_users

List all member users

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                                                                                                                                                                                                                                       |
| --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `groupId` | string  | Yes      | —       | The `id` of the group                                                                                                                                                                                                                                                                             |
| `after`   | string  | No       | —       | 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](https://developer.okta.com/docs/api/#pagination) and [Link header](https://developer.okta.com/docs/api/#link-header). |
| `limit`   | integer | No       | —       | Specifies the number of user results in a page                                                                                                                                                                                                                                                    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "after": {
        "type": "string",
        "description": "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](https://developer.okta.com/docs/api/#pagination) and [Link header](https://developer.okta.com/docs/api/#link-header)."
      },
      "limit": {
        "type": "integer",
        "description": "Specifies the number of user results in a page"
      }
    },
    "required": [
      "PCID",
      "groupId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_list\_groups

List all groups

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------- | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search`    | string  | No       | —       | Searches for groups with a supported [filtering](https://developer.okta.com/docs/api/#filter) 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](https://developer.okta.com/docs/api/#pagination).  The `search` string requires [URL encoding](https://developer.mozilla.org/en-US/docs/Glossary/Percent-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](https://developer.okta.com/docs/api/#operators). |
| `filter`    | string  | No       | —       | Filter expression for groups. See [Filter](https://developer.okta.com/docs/api/#filter).  Filtering supports the following limited number of properties: `id`, `type`, `lastUpdated`, and `lastMembershipUpdated`.  > **Note:** All filters must be [URL encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). 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](https://developer.okta.com/docs/api/#special-characters).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `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](https://developer.okta.com/docs/api/#pagination).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `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](https://developer.okta.com/docs/api/#pagination).  The Okta default `Everyone` group isn't returned for users with a group admin role.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `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`](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/addGroup!c=200\&path=_embedded\&t=response) 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](https://support.okta.com/help/s/article/Is-there-an-API-that-returns-the-number-of-users-in-a-group?language=en_US) for more information and an example.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `sortOrder` | string  | No       | —       | Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` isn't present.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "search": {
        "type": "string",
        "description": "Searches for groups with a supported [filtering](https://developer.okta.com/docs/api/#filter) 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](https://developer.okta.com/docs/api/#pagination).  The `search` string requires [URL encoding](https://developer.mozilla.org/en-US/docs/Glossary/Percent-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](/openapi/okta-management/management/group/listgroups#group/listgroups/t=response&c=200&path=_links/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](https://developer.okta.com/docs/api/#operators)."
      },
      "filter": {
        "type": "string",
        "description": "Filter expression for groups. See [Filter](https://developer.okta.com/docs/api/#filter).  Filtering supports the following limited number of properties: `id`, `type`, `lastUpdated`, and `lastMembershipUpdated`.  > **Note:** All filters must be [URL encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). 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](https://developer.okta.com/docs/api/#special-characters)."
      },
      "q": {
        "type": "string",
        "description": "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": {
        "type": "string",
        "description": "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](https://developer.okta.com/docs/api/#pagination)."
      },
      "limit": {
        "type": "integer",
        "description": "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](https://developer.okta.com/docs/api/#pagination).  The Okta default `Everyone` group isn't returned for users with a group admin role."
      },
      "expand": {
        "type": "string",
        "description": "If specified, additional metadata is included in the response. Possible values are `stats` and `app`. This additional metadata is listed in the [`_embedded`](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/addGroup!c=200&path=_embedded&t=response) 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](https://support.okta.com/help/s/article/Is-there-an-API-that-returns-the-number-of-users-in-a-group?language=en_US) for more information and an example."
      },
      "sortBy": {
        "type": "string",
        "description": "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."
      },
      "sortOrder": {
        "type": "string",
        "description": "Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` isn't present."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_replace\_group

Replace a group

**Parameters:**

| Parameter | Type   | Required | Default | Description           |
| --------- | ------ | -------- | ------- | --------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group |
| `body`    | object | Yes      | —       | Request body          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "body": {
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "groupId",
      "body"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_replace\_group\_rule

Replace a group rule

**Parameters:**

| Parameter     | Type   | Required | Default | Description                                                                                                                                             |
| ------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `groupRuleId` | string | Yes      | —       | The `id` of the group rule                                                                                                                              |
| `_embedded`   | object | No       | —       | This object appears with embedded resources related to the group rule if you use the `expand` query parameter                                           |
| `actions`     | object | No       | —       | Defines which users and groups to assign                                                                                                                |
| `conditions`  | object | No       | —       | Defines group rule conditions                                                                                                                           |
| `created`     | string | No       | —       | Creation date for group rule                                                                                                                            |
| `id`          | string | No       | —       | ID of the group rule                                                                                                                                    |
| `lastUpdated` | string | No       | —       | Date group rule was last updated                                                                                                                        |
| `name`        | string | No       | —       | Name of the group rule                                                                                                                                  |
| `status`      | string | No       | —       | Status of group rule. You can't update the status of a rule from `INACTIVE` to `ACTIVE`. You must use the activate and deactivate lifecycle operations. |
| `type`        | string | No       | —       | Type to indicate a group rule operation. Only `group_rule` is allowed.                                                                                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupRuleId": {
        "type": "string",
        "description": "The `id` of the group rule"
      },
      "_embedded": {
        "type": "object",
        "description": "This object appears with embedded resources related to the group rule if you use the `expand` query parameter",
        "properties": {
          "groupIdToGroupNameMap": {
            "type": "object",
            "description": "A mapping of group IDs to group names"
          }
        }
      },
      "actions": {
        "type": "object",
        "description": "Defines which users and groups to assign",
        "properties": {
          "assignUserToGroups": {
            "type": "object",
            "description": "Contains the `groupIds` array"
          }
        }
      },
      "conditions": {
        "type": "object",
        "description": "Defines group rule conditions",
        "properties": {
          "expression": {
            "type": "object",
            "description": "Defines Okta specific [group-rules expression](https://developer.okta.com/docs/reference/okta-expression-language/#expressions-in-group-rules)"
          },
          "people": {
            "type": "object",
            "description": "Defines conditions for `people` in a group rule"
          }
        }
      },
      "created": {
        "type": "string",
        "description": "Creation date for group rule"
      },
      "id": {
        "type": "string",
        "description": "ID of the group rule"
      },
      "lastUpdated": {
        "type": "string",
        "description": "Date group rule was last updated"
      },
      "name": {
        "type": "string",
        "description": "Name of the group rule"
      },
      "status": {
        "type": "string",
        "description": "Status of group rule. You can't update the status of a rule from `INACTIVE` to `ACTIVE`. You must use the activate and deactivate lifecycle operations.",
        "enum": [
          "ACTIVE",
          "INACTIVE",
          "INVALID"
        ]
      },
      "type": {
        "type": "string",
        "description": "Type to indicate a group rule operation. Only `group_rule` is allowed."
      }
    },
    "required": [
      "PCID",
      "groupRuleId"
    ]
  }
  ```
</Expandable>

***

## okta-groups\_unassign\_user\_from\_group

Unassign a user from a group

**Parameters:**

| Parameter | Type   | Required | Default | Description                 |
| --------- | ------ | -------- | ------- | --------------------------- |
| `groupId` | string | Yes      | —       | The `id` of the group       |
| `userId`  | string | Yes      | —       | ID of an existing Okta user |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "groupId": {
        "type": "string",
        "description": "The `id` of the group"
      },
      "userId": {
        "type": "string",
        "description": "ID of an existing Okta user"
      }
    },
    "required": [
      "PCID",
      "groupId",
      "userId"
    ]
  }
  ```
</Expandable>
