---
title: "POST /v1/saml/redeem"
method: POST
path: "/v1/saml/redeem"
tags: ["SSOReadyService"]
---

# POST /v1/saml/redeem

`POST /v1/saml/redeem`

Exchanges a SAML access code for details about your user's SAML login details.

## Request body

- RedeemSAMLAccessCodeRequest
  - `samlAccessCode` string — The SAML access code to redeem.

## Response `200`

OK

- RedeemSAMLAccessCodeResponse
  - `email` string — The user's email address.
  - `state` string — The `state` you provided when getting a SAML initiation URL, if any. If your user logged in to your product using Identity Provider-initiated SAML (e.g. they clicked on your app inside their corporate Okta dashboard), then `state` will be empty. SSOReady validates the authenticity of non-empty `state` values. You do not need to implement your own CSRF on top of it, but doing so anyway will have no bad consequences.
  - `attributes` object — Arbitrary key-value pairs the Identity Provider included about the user. Typically, these `attributes` are used to pass along the user's first/last name, or whether they should be considered an admin within their company.
  - `organizationId` string — The ID of the organization this user belongs to.
  - `organizationExternalId` string — The `externalId`, if any, of the organization this user belongs to.
  - `samlFlowId` string — A unique identifier of this particular SAML login. It is not a secret. You can safely log it. SSOReady maintains an audit log of every SAML login. Use this SAML flow ID to find this login in the audit logs.

## Other responses

- `default` — Default error response

## Changes

- **2024-08-13** `516b78b641b8` — 2 info
  - api operation id `RedeemSAMLAccessCode` removed and replaced with `SSOReadyService_RedeemSAMLAccessCode`
  - api tag `saml` removed

[Change history](https://skmtc.dev/ssoready/apis/ssoreadyservice-api/changes/v1/saml/redeem/post.md)

---

[API](https://skmtc.dev/ssoready/apis/ssoreadyservice-api.md) · [All operations](https://skmtc.dev/ssoready/apis/ssoreadyservice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ssoready/ssoreadyservice-api/revisions/0827d713f08e/schema)
