---
title: "Workspace SSO configuration"
method: POST
path: "/workspaces/{workspace_id}/sso"
tags: ["authentication"]
---

# Workspace SSO configuration

`POST /workspaces/{workspace_id}/sso`

## Request

- Base URL: `https://localhost:8080/api/v9`
- URL: `https://localhost:8080/api/v9/workspaces/{workspace_id}/sso`
- Auth: none declared
- TypeScript: <https://skmtc.dev/toggl/apis/toggl-api/docs/workspaces/:workspace_id/sso/post.ts> (a function with typed inputs; its response is checked against the schema)

Save the SSO configuration for a workspace.

## Path parameters

- `workspace_id` integer, required

## Request body

- ModelsSSOConfig
  - `certificate` string
  - `domain` string
  - `enabled` boolean
  - `entity_id` string
  - `metadata_url` string
  - `name` string
  - `sso_url` string

## Response `200`

Successful operation.

- ModelsSSOConfig
  - `certificate` string
  - `domain` string
  - `enabled` boolean
  - `entity_id` string
  - `metadata_url` string
  - `name` string
  - `sso_url` string

## Other responses

- `400`: Possible message error: * Config name cannot be empty * Config domain cannot be empty * Config name value too long (max. 32), * Config domain value too long (max. 254), * Config entity id value too long (max. 1024), * Configuration should be done using metadata\_url or separated parameters, not both * Invalid configuration - missing required fields * Invalid certificate
- `403`: Possible message error: * Could be one of these: Workspace not found/accessible * Need to be the owner of the organization * Only valid for premium workspace and _Single Sign On_ must be enabled * Entity id must not be empty * Idp descriptors must not be empty * Certificates must not be empty * Metadata certificate\[0\] must not be empty * SSO services must not be empty * Invalid certificate
- `500`: We're sorry, but something went terribly wrong. We have been notified about the error. Please try again later.

---

[API](https://skmtc.dev/toggl/apis/toggl-api.md) - [All operations](https://skmtc.dev/toggl/apis/toggl-api/llms.txt) - [OpenAPI document](https://skmtc.dev/toggl/apis/toggl-api/revisions/3085aee16990?raw)
