> For the complete documentation index, see [llms.txt](https://docs.strongdm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.strongdm.com/references/scim/groups/create.md).

# Generic SCIM Endpoint - Create Group

The Create Group endpoint creates the requested role in StrongDM and assigns it to any designated users.

### Request

#### Endpoint

`/provisioning/generic/v2/Groups`

#### HTTP method

`POST`

#### Parameters

None

#### Request body attributes

| Attribute     | Requirement | Description                                                                                                                                                                                                | Notes                                                                                                                           | Example                                                                  |
| ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `displayName` | Required    | Display name of the role                                                                                                                                                                                   | Returns a 400 if the provided value is empty; returns a 409 if the provided value is already in use                             | `"RoleName"`                                                             |
| `members`     | Required    | List of the members of the group/role with subattributes `value` (user ID) and `display` (human-readable descriptor of the user, for your own use) of the user(s) to be assigned to the role from creation | Returns a 400 if the IDs are formatted incorrectly or are invalid; ignores IDs that are correctly formatted but cannot be found | `[{"value": "a-66f584886171b51d", "display": "userEmail@example.test"}]` |
| `schemas`     | Required    | Schema URI for representing groups                                                                                                                                                                         | Include the value as indicated in the example.                                                                                  | `["urn:ietf:params:scim:schemas:core:2.0:Group"]`                        |

#### Example request

`POST app.strongdm.com/provisioning/generic/v2/Groups`

```json
{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
  "displayName": "RoleName",
  "members": [
    {
      "value": "a-66f584886171b51d",
      "display": "userEmail@example.test"
    }
  ]
}
```

### Response

#### Example success response

```json
{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
  "displayName": "RoleName",
  "id": "r-027230536171b51d",
  "members": [
    {
      "value": "a-66f584886171b51d",
      "display": "userEmail@example.test"
    }
  ],
  "meta": { "resourceType": "Group", "location": "Groups/r-027230536171b51d" }
}
```

#### Example response if displayName was not provided

```json
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "detail": "could not create role: cannot create role: invalid operation: name cannot be empty",
  "status": "400"
}
```

#### Example response if displayName is already in use

```json
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "scimType": "uniqueness",
  "detail": "One or more of the attribute values are already in use or are reserved.",
  "status": "409"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.strongdm.com/references/scim/groups/create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
