# SSO SAML Connection API

**URL:** <https://community.auth0.com/t/sso-saml-connection-api/98540>\
**Category:** Get Help\
**Tags:** connections-management-api, management-api, connections, saml-enterprise-connection\
**Created:** [January 19, 2023, 11:40pm UTC](https://community.auth0.com/t/sso-saml-connection-api/98540 "2023-01-19T23:40:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nikki/32/13374_2.png) [@nikki](https://community.auth0.com/u/nikki)\
**Post date:** [January 19, 2023, 11:40pm UTC](https://community.auth0.com/t/sso-saml-connection-api/98540/1 "2023-01-19T23:40:23Z")

</div>

Hello,

We are trying to create an SSO SAML connection through the API, but we are having trouble to setup the following and unable to find a good documentation on them:

- IdP-initiated SSO Behavior (How to set Default Application, Response Protocol and Query String through API).
- Login Experience (Home Realm Discovery) (looking for a way to set Identity Provider domains through API).

Edit: adding screenshots

 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/6/a6060834e4d10e40e69e5ab2891d36836ba43db1.png)

 ![image](https://global.discourse-cdn.com/auth0/original/3X/c/e/cef55cfa0fad2857ceac41e00d3d33db6b4f8907.png)

1/24/2023: Still can’t find a way to set those up through API.  
1/25/2023: Bumping this up. Need expert help. Thank you.

Thank you so much in advanced.

Regards,

Nikki

---

<div class="post-metadata">

**Author:** ![nikki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nikki/32/13374_2.png) [@nikki](https://community.auth0.com/u/nikki)\
**Post date:** [January 30, 2023, 2:53pm UTC](https://community.auth0.com/t/sso-saml-connection-api/98540/2 "2023-01-30T14:53:31Z")

</div>

Hello, can anyone shed a light on this? Thank you.

1/31/2023: Still need help

---

<div class="post-metadata">

**Author:** ![thanish.nizam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thanish.nizam/32/52416_2.png) [@thanish.nizam](https://community.auth0.com/u/thanish.nizam)\
**Post date:** [November 14, 2023, 7:58am UTC](https://community.auth0.com/t/sso-saml-connection-api/98540/3 "2023-11-14T07:58:04Z")

</div>

Hi @nikki ,  
Did you figure out how to set this? I’m having the same issue and I couldn’t find any documentation.

---

<div class="post-metadata">

**Author:** ![thanish.nizam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thanish.nizam/32/52416_2.png) [@thanish.nizam](https://community.auth0.com/u/thanish.nizam)\
**Post date:** [November 14, 2023, 8:19am UTC](https://community.auth0.com/t/sso-saml-connection-api/98540/4 "2023-11-14T08:19:17Z")

</div>

Just found that we can set these fields under options when creating a connection.

```auto
tenant_domain: 'email-domain.com',
domain_aliases: ['email-domain.com', 'another-domain.com'],

```

---

<div class="post-metadata">

**Author:** ![nikki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nikki/32/13374_2.png) [@nikki](https://community.auth0.com/u/nikki)\
**Post date:** [November 14, 2023, 3:26pm UTC](https://community.auth0.com/t/sso-saml-connection-api/98540/5 "2023-11-14T15:26:02Z")

</div>

Hi @thanish.nizam,

Yes, we finally figured it out by creating a ticket with Auth0. Anyway, here’s the reply from the support team:

To set the IdP-initiated SSO Behavior (Default Application, Response Protocol and Query String) and Login Experience (Home Realm Discovery) via API when creating a new connection you would need to pass additional elements in options object similar to the below:

“options”: {

“idpinitiated”: {  
“enabled”: true,  
“client\_id”: “{CLIENT\_ID}”,  
“client\_protocol”: “samlp”,  
“client\_authorizequery”: “YOUR Query String”  
},  
“tenant\_domain”: “[test.com](http://test.com)”,  
“disableSignout”: true,  
“domain\_aliases”: [“[test.com](http://test.com)”]  
}

[https://auth0.com/docs/api/management/v2#!/Connections/post\_connections](https://auth0.com/docs/api/management/v2#!/Connections/post_connections)

---

<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:** [December 10, 2024, 12:51am UTC](https://community.auth0.com/t/sso-saml-connection-api/98540/6 "2024-12-10T00:51:57Z")

</div>

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