# Block IDP initiated flow in Auth0 SP

**URL:** <https://community.auth0.com/t/block-idp-initiated-flow-in-auth0-sp/31113>\
**Category:** Get Help\
**Tags:** idp-initiated, auth0, saml\
**Created:** [September 19, 2019, 12:55pm UTC](https://community.auth0.com/t/block-idp-initiated-flow-in-auth0-sp/31113 "2019-09-19T12:55:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradhapreee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pradhapreee/32/13390_2.png) [@pradhapreee](https://community.auth0.com/u/pradhapreee)\
**Post date:** [September 19, 2019, 12:55pm UTC](https://community.auth0.com/t/block-idp-initiated-flow-in-auth0-sp/31113/1 "2019-09-19T12:55:02Z")

</div>

Hello All,

We have configured IDP and SP in auth0 and both IDP and SP initiated flow is working as expected and now we have a special scenario in which we need to block IDP initiated flow .  
I tried removing configuration of IDP-initiated flow in “SAMLP Identity Provider” connection but I’m getting error on the same. Is there any way we can block IDP initiated flow? Can we write some rule for the same in SP tenant?

Thank you

---

<div class="post-metadata">

**Author:** ![jatinvaidya](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jatinvaidya/32/13907_2.png) [@jatinvaidya](https://community.auth0.com/u/jatinvaidya)\
**Post date:** [March 12, 2020, 7:46am UTC](https://community.auth0.com/t/block-idp-initiated-flow-in-auth0-sp/31113/2 "2020-03-12T07:46:37Z")

</div>

What error do you get? So, you want to allow IDP initiated SSO on certain scenarios and not allow on some other scenarios? Please provide some examples.  
Ideally, IDP initiated flows should not be used for [security reasons](https://auth0.com/docs/protocols/saml/idp-initiated-sso#risks-of-using-an-idp-initiated-sso-flow)  
You can easily mimic an IdP initiated SSO by having the user click on a link that takes them to the application’s SSO login endpoint, which in turn will start an SP initiated flow.
