# "Use Common Endpoint" Azure AD Connector fails

**URL:** <https://community.auth0.com/t/use-common-endpoint-azure-ad-connector-fails/10336>\
**Category:** Get Help\
**Created:** [March 23, 2018, 3:01pm UTC](https://community.auth0.com/t/use-common-endpoint-azure-ad-connector-fails/10336 "2018-03-23T15:01:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.beals](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/justin.beals/32/8300_2.png) [@justin.beals](https://community.auth0.com/u/justin.beals)\
**Post date:** [March 23, 2018, 3:01pm UTC](https://community.auth0.com/t/use-common-endpoint-azure-ad-connector-fails/10336/1 "2018-03-23T15:01:40Z")

</div>

I have been trying to setup a multi-tenant Azure AD login. I’ve setup an auth0 Enterprise Connection for Microsoft Azure AD and provisioned a multi-tenant application in Microsoft Azure AD. In Auth0 I have clicked the “Use Common Endpoint” multiple times and saved the setting successfully. Every time I check the setting it is unchecked.

When I check the URL’s being called by the Auth0 connector I can see that the connector is calling:

> **[Sign in to your account](https://login.microsoftonline.com/koruhire.onmicrosoft.com/oauth2/authorize?prompt=consent&resource=https%3A%2F%2Fgraph.windows.net&response_type=code&client_id=%7Bclientid%7D&redirect_uri=https%3A%2F%2Fk0ru.auth0.com%2Flogin%2Fcallback&scope=openid&state=%7BstateValue%7D)**

It should be using the url [Sign in to your account](https://login.windows.net/common/oauth2/authorize) to be setup as a multi-tenant solution.

Any advice on troubleshooting this issue?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [March 27, 2018, 9:54pm UTC](https://community.auth0.com/t/use-common-endpoint-azure-ad-connector-fails/10336/2 "2018-03-27T21:54:58Z")

</div>

👋 @justin.beals

This may be a bug in the dashboard. While I look into that, we should be able to fix this issue with the management API for now:

1- Get the connection’s current state with [get a connection API](https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id). You may also use [get all connections API](https://auth0.com/docs/api/management/v2#!/Connections/get_connections) to get all the connections.

2- Save the JSON returned for the Azure AD connection from the above call. Add `useCommonEndpoint: true` in the connection JSON’s options field. E.g;

```auto
{
  "options": { 
     "useCommonEndpoint": true,
     ....
  }, ...
}

```

3- Copy the JSON into update a [connection API](https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id). Please note you may need to remove certain fields until it successfully patches the connection.

Afterwards, if you navigate to the dashboard the toggle button should be turned on for common endpoint. You can also test the connection with the Try button.

---

<div class="post-metadata">

**Author:** ![justin.beals](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/justin.beals/32/8300_2.png) [@justin.beals](https://community.auth0.com/u/justin.beals)\
**Post date:** [March 28, 2018, 6:43pm UTC](https://community.auth0.com/t/use-common-endpoint-azure-ad-connector-fails/10336/3 "2018-03-28T18:43:58Z")

</div>

Thanks Kim that was really helpful. I was able to resolve the multi-tenancy issue in Azure AD.

Justin Beals

---

<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 30, 2018, 4:27pm UTC](https://community.auth0.com/t/use-common-endpoint-azure-ad-connector-fails/10336/4 "2018-03-30T16:27:32Z")

</div>

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