# Idp-Initiated SSO With Mulitple Landing Sites

**URL:** <https://community.auth0.com/t/idp-initiated-sso-with-mulitple-landing-sites/43022>\
**Category:** Get Help\
**Tags:** idp-initiated\
**Created:** [May 14, 2020, 1:52pm UTC](https://community.auth0.com/t/idp-initiated-sso-with-mulitple-landing-sites/43022 "2020-05-14T13:52:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.schultz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.schultz/32/12778_2.png) [@david.schultz](https://community.auth0.com/u/david.schultz)\
**Post date:** [May 14, 2020, 1:52pm UTC](https://community.auth0.com/t/idp-initiated-sso-with-mulitple-landing-sites/43022/1 "2020-05-14T13:52:56Z")

</div>

I know that an enterprise connection has a default ipd-initiated application that it forwards to on an idp-initiated login. Is there a way either in the saml assertion or query string to specify either a different application or a different callback site for the login to land on? I’m trying to avoid having to set up a unique SAML connection for each possible landing page in an idp-initiated flow.

This post is very similar, but I don’t see an answer: [IdP-Initiated SSO where IdP provides the redirect\_url](http://community.auth0.com/t/idp-initiated-sso-where-idp-provides-the-redirect-url/13906)

Thanks!

---

<div class="post-metadata">

**Author:** ![alan.mcafee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alan.mcafee/32/10600_2.png) [@alan.mcafee](https://community.auth0.com/u/alan.mcafee)\
**Post date:** [May 14, 2020, 9:55pm UTC](https://community.auth0.com/t/idp-initiated-sso-with-mulitple-landing-sites/43022/2 "2020-05-14T21:55:08Z")

</div>

If you want to accomplish this in the callback code, you will need the IdP to supply the RelayState in the SAML Response. Once verified by Auth0, the resulting hash to the callback route will contain a “state=” parameter, that will hold the value of the relaystate (i.e. [http://yoursite.com/callback#accessToken=xxxx&idToken=xxxx&state=https://myothersite.com/home](http://yoursite.com/callback#accessToken=xxxx&idToken=xxxx&state=https://myothersite.com/home)).  
For our system, which is a collection of microsites, we tell the IdP to include a full, valid, url for the RelayState, then take the hash that is sent to the callback url, parse it, and retrieve the “state” value, if it exists. For us, that value goes through several internal checks to ensure it is valid and then sends the user to the desired landing page.  
Another option, if every user from that connection is going to land on the same location, is to include a “redirect\_uri” in the connections query string parameters in Auth0.
