New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

Complete IdP-Initiated SAML Login for Browsers

GET 

/self-service/methods/saml/idp-initiated/:provider

This endpoint is the entry point for IdP-initiated login through Ory Polis. Ory Polis redirects the browser here with a single-use authorization code after validating an unsolicited SAML response; Kratos then starts a regular browser login flow and forwards the code as a code_hint so Polis can complete the flow without a second round-trip to the identity provider.

The provider must be a jackson provider with idp_initiated_login_enabled set to true in its configuration.

This endpoint is NOT INTENDED for API clients and only works with browsers.

SDK ReferenceTypeScript
createIdPInitiatedSamlBrowserLoginFlow()
ParametersTypeRequiredDescription
providerstringrequiredThe SAML provider ID as configured in the Ory Kratos configuration.
codestringrequiredThe single-use authorization code issued by Ory Polis for the unsolicited SAML response.
VariableType
dataErrorGeneric