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

Skip to main content

Initiate Native SAML Sign-In

GET 

/self-service/methods/saml/init/:provider

This endpoint starts a native SP-initiated SAML sign-in for the given connection. It checks that the flow named by the flow query parameter exists as the kind named by purpose, builds a SAML AuthnRequest, and forwards the browser to the identity provider's Single Sign-On endpoint -- either with an HTTP 302 redirect (HTTP-Redirect binding) or by returning a self-submitting HTML form (HTTP-POST binding).

A login, registration, or settings flow redirects here as a browser navigation once a SAML connection has been selected. This endpoint is NOT INTENDED to be called directly by API clients: it is a browser navigation target, not a JSON API.

SDK ReferenceTypeScript
initSamlLogin()
ParametersTypeRequiredDescription
providerstringrequiredThe SAML connection ID to start a native SP-initiated sign-in for.
flowstringrequiredThe Login, Registration, or Settings Flow ID this SAML sign-in continues.
purpose'login' | 'registration' | 'settings-link'requiredThe kind of flow `flow` names: `login`, `registration`, or `settings-link` (a settings flow linking a new SAML credential). The flow must exist in the named kind, or the request is not found.
VariableType
datastring