---
title: "SAML2 Identity Provider Callback"
method: POST
path: "/auth/saml2/login/{workspace_id}"
tags: ["authentication"]
---

# SAML2 Identity Provider Callback

`POST /auth/saml2/login/{workspace_id}`

## Request

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

Receives the IdP Callback containing the SAML2 assertion with response of user authentication in the IdP.

## Path parameters

- `workspace_id` integer, required

## Request body `application/x-www-form-urlencoded`

- object
  - `SAMLResponse` string, required: SAML2 assertion with authentication response
  - `RelayState` string: Encoded string containing client and host which originated the requests

## Other responses

- `302`: Authentication result URI
- `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)
