# Home realm discovery setup with management API

**URL:** <https://community.auth0.com/t/home-realm-discovery-setup-with-management-api/127851>\
**Category:** Get Help\
**Tags:** connections, saml-enterprise-connection\
**Created:** [February 20, 2024, 2:59pm UTC](https://community.auth0.com/t/home-realm-discovery-setup-with-management-api/127851 "2024-02-20T14:59:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoav.baavour](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yoav.baavour/32/54986_2.png) [@yoav.baavour](https://community.auth0.com/u/yoav.baavour)\
**Post date:** [February 20, 2024, 2:59pm UTC](https://community.auth0.com/t/home-realm-discovery-setup-with-management-api/127851/1 "2024-02-20T14:59:36Z")

</div>

Hey,  
Using python SDK, I’d like to create a SAML connection and overall, thanks to [this](https://community.auth0.com/t/what-are-the-supported-properties-when-creating-a-saml-connection-via-the-management-api/79016/9) post, I managed to get what i want.

The connection is being created just fine, however the Home Realm Discovery feature does not hold any domain in it.  
If I want it to include [example.com](http://example.com), how would I go about it?  
I tried adding `"realms": ["example.com"]` in the payload’s body, however i get the following error:  
`auth0.v3.exceptions.Auth0Error: 400: Realms is only supported for database connections. `

---

<div class="post-metadata">

**Author:** ![yoav.baavour](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yoav.baavour/32/54986_2.png) [@yoav.baavour](https://community.auth0.com/u/yoav.baavour)\
**Post date:** [March 7, 2024, 8:44am UTC](https://community.auth0.com/t/home-realm-discovery-setup-with-management-api/127851/2 "2024-03-07T08:44:11Z")

</div>

to answer any future enquiries, the field i was missing was “domain\_aliases”. this allows to add email domains to the SAML app’s login experience.

---

<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:** [March 21, 2024, 8:44am UTC](https://community.auth0.com/t/home-realm-discovery-setup-with-management-api/127851/3 "2024-03-21T08:44:32Z")

</div>

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