# Finish signing in through a SAML identity provider

> Page: https://docs.plotwork.dev/api/post-auth-sso-saml-org-acs. Index of every page: https://docs.plotwork.dev/llms.txt

The assertion consumer service.

`POST /auth/sso/saml/{org}/acs`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Finish signing in through a SAML identity provider. |
| What does it take? | `org` in the path. |
| What does it return? | Status 200 with no body. |
| What can go wrong? | `303` to the return address, or to the portal's sign-in page with `sso_error`; `400` not an organisation id; `413` the body is too large; `429` too many requests; `503` the portal's address is not set on this server. Every failure uses the one error envelope. |

## What it does

The assertion consumer service. The RelayState's flow is spent once and needs the browser's flow cookie; the SAML Worker checks the signature, the issuer, the audience, the destination, the recipient, the times and InResponseTo. Opens a new session and redirects, or redirects to the portal's sign-in page with `sso_error`.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 303 | To the return address, or to the portal's sign-in page with `sso_error`. | none |
| 400 | Not an organisation id. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 413 | The body is too large. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | The portal's address is not set on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
