Handle SAML authentication request (POST binding)

POST /api/saml/{id}/authn

Process SAML authentication request using HTTP POST binding.

Path parameters

  • id string Required

    The ID of the SAML application.

Body Required

Body Required

  • SAMLRequest string Required

    Base64-encoded SAML request message.

  • Optional state parameter to be returned in the response.

Responses

  • 200 application/json

    OK

  • Redirects to the sign-in page.

  • Invalid SAML request.

  • The SAML application was not found.

POST /api/saml/{id}/authn
curl \
 --request POST https://[tenant_id].logto.app/api/saml/{id}/authn \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"SAMLRequest":"string","RelayState":"string"}'
curl \
 --request POST https://[tenant_id].logto.app/api/saml/{id}/authn \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'SAMLRequest=string&RelayState=string'
Request examples
{
  "SAMLRequest": "string",
  "RelayState": "string"
}