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

# User & group provisioning

> How to provision users & groups into Soma

Users and groups play an important role in Soma's security & application model. Users provide the following functionality:

* Ability to invoke agents & workflows
* Ability to access the Soma admin UI

A user's functionality is ultimately determined by the role (*not group*) assigned to them.

Groups  provide the following functionality:

* Group approval workflows

### Group approval workflows

<Warning>
  Group approval workflows are still being built and will be available in a future release.
</Warning>

<Tabs>
  <Tab title="Typescript">
    ```typescript theme={null}
    const {
        waitForApproval,
        approvalConfirmationUrl,
        approvalRejectionUrl,
    } = await ctx.group.requestApproval("gorup-id");
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    waitForApproval, approvalConfirmationUrl, approvalRejectionUrl = ctx.soma.group.request_approval("group-id")
    ```
  </Tab>
</Tabs>

## Synchronizing users, groups & roles

### The manual way

You can manually synchronize users, groups & roles into Soma.
First, create an admin API key:

```bash theme={null}
soma api-key add --role admin example-id
```

Then, you can use the following API endpoint to synchronize users, groups & roles:

* `GET / PUT / POST / DELETE /api/identity/v1/users` - manage users
* `GET / PUT / POST / DELETE /api/identity/v1/groups` - manage groups
* ` POST / DELETE /api/identity/v1/groups/{id}/members` - manage group members

### SCIM

SCIM is a standard for provisioning users, groups & roles into Soma. You can configure a SCIM endpoint to synchronize users, groups & roles into Soma.
From more information about SCIM, please read the following [resource](https://scim.cloud/).

You can configure authentication checks for the SCIM endpoint using:

* API key (provision a Soma API key with an admin role)

<Warning>
  SCIM is still a work in progress. More documentation about role mapping, other authentication methods and schemas will be available in a future release.
</Warning>

### LDAP sync

<Warning>
  LDAP sync is still being built and will be available in a future release.
</Warning>
