IdP-initiated SSO vs SP-initiated SSO
Single sign-on (SSO) can be initiated by the service provider (SP) or the identity provider (IdP). What is the difference between IdP-initiated SSO and SP-initiated SSO? What are the risks of SP-initiated SSO?
Single sign-on (SSO) can be initiated by the service provider (SP) or the identity provider (IdP). What is the difference between IdP-initiated SSO and SP-initiated SSO? What are the risks of SP-initiated SSO?
As the name suggests, SP-initiated SSO is initiated by the service provider. The user starts the authentication process by accessing a resource on the SP's website. The SP then redirects the user to the IdP for authentication. Once the user is authenticated, the IdP generates a token (OIDC) or a SAML assertion (SAML) and sends it back to the SP. The SP validates the token or assertion and grants access to the user.
Unlike SP-initiated SSO, IdP-initiated SSO is initiated by the identity provider. The user starts the authentication process from the IdP's website. Normally, the user will find a list of supported SP applications on the IdP's portal. The user clicks on the SP application and redirects to the SP's website with a pre-authenticated identity.

IdP-initiated SSO in more adopted by large enterprise and organizations that rely on various third-party apps or services. Like Workday, Salesforce etc. It provides a centralized way to manage user access to multiple applications and enforce SSO authentications. By enabling IdP-initiated SSO, employees can directly access the connected applications from the IdP's portal without the need to visit each application's website. Reducing the onboarding time and improving the user experience.
IdP-initiated SSO carries more risk compared to SP-initiated SSO:
Lack of authentication context: All the authentication requests initiated from IdP are unsolicited. Thus, the SP initiated the authentication process, potentially opening the door to unauthorized access. There is a risk that the user's session could be hijacked. A malicious actor could initiated the login process for a legitimate user without their knowledge or consent.
Session fixation: Since the SP does not initiate the authentication process, the user's session could be fixed to the IdP's session. This could lead to session fixation attacks where an attacker could fix the user's session to the IdP's session and gain unauthorized access to the user's account.
Phishing attacks: IdP-initiated SSO could be vulnerable to phishing attacks. A malicious actor could trick the user into visiting a fake IdP's portal and steal the user's credentials. Once the user logs in, the attacker could redirect the user to the SP with a pre-authenticated identity.
No assurance on request validation: In a SP-initiated SSO, normally the SP will includes necessary security information in the request to the IdP to maintain the integrity of the request. Once the SP receives the authentication response, it will validate these information to prevent any CSRF attacks. E.g. The state parameter in OIDC and RelayState in SAML. However, in IdP-initiated SSO, the SP does not initiate the authentication process, thus the SP has no assurance on the request validation.
Limitations of IdP-initiated SSO:
IdP-initiated SSO is not supported by OIDC due to the above vulnerabilities. OIDC requires the SP to initiate the authentication process to ensure the validity of the request. Even is cases where users begin the authentication process from a third-party that is not the SP, the user should be first directed to the SP to initiate the authentication process.
IdP-initiated SSO is more common in SAML based SSO. The IdP can generate a SAML assertion w/o the SP initiating the authentication process. In a SAML IdP-initiated SSO, a SAML assertion without a proper RequestID and RelayState could be sent to the SP's ACS URL directly. The SP should be able to handle this kind of assertion and grant access to the user. (Note: Without the RequestID and RelayState, the SP has no assurance on the validity of the request).
In all aspects, SP-initiated SSO is considered more secure and reliable compared to the IdP-initiated SSO. No matter the protocol (OIDC or SAML), it ensures that the authentication process is tied to an active user session and a specific request initiated by the SP. This reduces the risk of certain attacks, such as Replay Attacks and Identity Confusion, by providing the following security benefits:
Even though SP-initiated SSO is more secure and is highly recommended in all scenarios, due to the business requirements and the limitations of the third-party applications, IdP-initiated SSO is still in use in many organizations.
Both IdP-initiated SSO and SP-initiated SSO have their use cases, but SP-initiated SSO is strongly recommended in today’s world, where data privacy and cybersecurity are more important than ever. It offers better security by ensuring authentication requests are tied to the Service Provider’s session, reducing risks of unsolicited requests and providing stronger session management. However, IdP-initiated SSO is still necessary for broader adoption and ease of access, especially in environments where user convenience and centralized access are priorities.
Try Logto today. With the Logto SSO solution, you can easily integrate both IdP-initiated and SP-initiated SSO for your applications and gradually migrate to a more secure and reliable authentication system.