# Disable Idp Domain for some users

**URL:** <https://community.auth0.com/t/disable-idp-domain-for-some-users/97051>\
**Category:** Get Help\
**Tags:** login, auth0, universal-login\
**Created:** [December 24, 2022, 12:17pm UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051 "2022-12-24T12:17:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.hang.12138](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.hang.12138/32/35668_2.png) [@david.hang.12138](https://community.auth0.com/u/david.hang.12138)\
**Post date:** [December 24, 2022, 12:17pm UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051/1 "2022-12-24T12:17:44Z")

</div>

Is there a way to disable home realm discovery for some users?  
Currently, if I set up a SAML connection and setup the domain to [xyz.com](http://xyz.com/), any user with that domain will get routed to that IDP.  
However, we have a use case where some [xyz.com](http://xyz.com/) users may use that IDP, and others will want to login using username/password.  
And I am not going to add IdP buttons in the universal login page, since we are going to have so many SAMLs.  
So I selected “Identifier First” in the “Authentication Profile” Page and unchecked “Display connection as a button”.  
I know this is similar to the following link, and I am new to Auth0, don’t understand what exactly I should do.

> [@Home Realm Discovery - Customization](https://community.auth0.com/t/home-realm-discovery-customization/57912):
>
> Is there a way to modify how home realm discovery works. Currently, if I set up a SAML connection and setup the domain to [xyz.com](http://xyz.com), any user with that domain will get routed to that IDP. However, we have a use case where some [xyz.com](http://xyz.com) users may use that IDP, and others will want to login using username/password, or even another IDP. Our user structure does this by referencing a higher level account assignment, to resolve the IDP.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [December 26, 2022, 9:59pm UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051/2 "2022-12-26T21:59:09Z")

</div>

Hi @david.hang.12138

Welcome to the Auth0 Community!

If you know beforehand the user account intending to login, thinking out aloud perhaps you have your own login page where a user enter’s their email address before they reach our hosted Universal Login page. You may be doing a lookup against the email using your own logic to find the connection maybe. Then you may pass the relevant connection into /authorize along with the users email address as the login\_hint so when the user reaches Universal Login the email field is pre-filled. This way as you’re passing in the connection property HRD will essentially not activate as the user will be directed to the IdP for the connection.

For example:

```auto
https://your-domain/authorize?&response_type=code&client_id=VRoG781hIDGNQ74ViUNNwqScSjmR9qId&redirect_uri=http://jwt.io&connection=Username-Password-Authentication&login_hint=testuser@exampleco.com

```

I hope this helps you.  
Warm regards.

---

<div class="post-metadata">

**Author:** ![david.hang.12138](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.hang.12138/32/35668_2.png) [@david.hang.12138](https://community.auth0.com/u/david.hang.12138)\
**Post date:** [December 26, 2022, 11:48pm UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051/3 "2022-12-26T23:48:32Z")

</div>

> [@SaqibHussain](#):
>
> `login_hint`

Thanks for your reply, I also have found a similar way using auth0.js library.  
I guess login\_hint field is really helpful for me.  
Let me try and get back to you.

---

<div class="post-metadata">

**Author:** ![david.hang.12138](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/david.hang.12138/32/35668_2.png) [@david.hang.12138](https://community.auth0.com/u/david.hang.12138)\
**Post date:** [December 27, 2022, 12:01am UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051/4 "2022-12-27T00:01:22Z")

</div>

I have a new question. According to your suggestion, I am going to build my own login page which requires user to input his email, first.  
In this page, I will also have “Forget password” and “Sign Up” button.  
I hope when user clicks these buttons, they can redirect to “Forget password” or “Sign Up” page of Auth0.  
How can I achieve this purpose?  
Thank you.

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [December 27, 2022, 11:11pm UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051/5 "2022-12-27T23:11:09Z")

</div>

Hi @david.hang.12138  
I expect you would have to create custom sign up and forgot password screens as well if you take the custom login screen route. You can create a user and a forgot password tickets where you can redirect the user to via the management api, please refer to [create user](https://auth0.com/docs/api/management/v2#!/Users/post_users) and [password change ticket](https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change)

Warm regards.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 10, 2023, 11:12pm UTC](https://community.auth0.com/t/disable-idp-domain-for-some-users/97051/6 "2023-01-10T23:12:06Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
