Files
coder/docs/admin/users/headless-auth.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.1 KiB
Markdown
Raw Normal View History

---
title: Headless Authentication
---
2024-10-05 08:52:04 -07:00
> [!NOTE]
> Creating service accounts requires a [Premium license](https://coder.com/pricing).
2024-10-05 08:52:04 -07:00
Service accounts are headless user accounts that cannot use the web UI to log in
to Coder. This is useful for creating accounts for automated systems, such as
CI/CD pipelines or for users who only consume Coder via another client/API. Service accounts do not have passwords or associated email addresses.
2024-10-05 08:52:04 -07:00
You must have the User Admin role or above to create service accounts.
## Create a service account
2024-10-05 08:52:04 -07:00
<div class="tabs">
## CLI
Use the `--service-account` flag to create a dedicated service account:
2024-10-05 08:52:04 -07:00
```sh
coder users create \
--username="coder-bot" \
--service-account
2024-10-05 08:52:04 -07:00
```
## UI
Navigate to **Deployment** > **Users** > **New user**, then select **Service account** as the login type.
2024-10-05 08:52:04 -07:00
![Create a user via the UI](../../images/admin/users/headless-user.png)
</div>
## Authenticate as a service account
2024-10-05 08:52:04 -07:00
To make API or CLI requests on behalf of the headless user, learn how to
[generate API tokens on behalf of a user](./sessions-tokens.md#generate-a-long-lived-api-token-on-behalf-of-another-user).