# Not Able to Update Realms For Enterprise connections Using API

**URL:** <https://community.auth0.com/t/not-able-to-update-realms-for-enterprise-connections-using-api/117323>\
**Category:** Get Help\
**Tags:** connections-management-api, management-api\
**Created:** [September 28, 2023, 3:31am UTC](https://community.auth0.com/t/not-able-to-update-realms-for-enterprise-connections-using-api/117323 "2023-09-28T03:31:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan109587](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saravanan109587/32/50664_2.png) [@saravanan109587](https://community.auth0.com/u/saravanan109587)\
**Post date:** [September 28, 2023, 3:31am UTC](https://community.auth0.com/t/not-able-to-update-realms-for-enterprise-connections-using-api/117323/1 "2023-09-28T03:31:57Z")

</div>

I can update a Realms domain using the Auth0 dashboard, but when I attempt to do the same using the Auth0 API, it’s not working. It throws an error stating that Realms are only supported for database connections. What could be causing this discrepancy, and how can I successfully update a Realms domain via the Auth0 API?

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

---

<div class="post-metadata">

**Author:** ![sylvainf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sylvainf/32/35478_2.png) [@sylvainf](https://community.auth0.com/u/sylvainf)\
**Post date:** [September 29, 2023, 4:48pm UTC](https://community.auth0.com/t/not-able-to-update-realms-for-enterprise-connections-using-api/117323/2 "2023-09-29T16:48:48Z")

</div>

Hi @saravanan109587

The name of the property is ‘domain\_aliases’ under the ‘options’ property. It expects an array. Here’s a working example in Python (PATCH call to modify the Connection)

```
	payload = {	
		'options': {
		'use_wsfed': False,
			'useCommonEndpoint': False,
			'basic_profile': False,
			'ext_profile': False,
			'ext_groups': False,
			'ext_nested_groups': False,
			'api_enable_users': False,
			'waad_protocol': 'openid-connect',
			'identity_api': 'microsoft-identity-platform-v2.0',
			'should_trust_email_verified_connection': 'never_set_emails_as_verified',
			'domain': 'my_azure_domain.com',
			'tenant_domain': 'my_domain.com',
			'client_id': 'abc',
			'client_secret': '123',
			'domain_aliases':["mydomain.com"],
			'realms': ["Azure"]
			}
		}

	r = requests.patch(url + f'/api/v2/connections/<your conn_id>', headers=headers, json=payload).json()
	pprint(r)

```

---

<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 2, 2024, 4:51am UTC](https://community.auth0.com/t/not-able-to-update-realms-for-enterprise-connections-using-api/117323/3 "2024-01-02T04:51:41Z")

</div>

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