# Not able to get Azure AD working with a common login endpoint

**URL:** https://meta.discourse.org/t/not-able-to-get-azure-ad-working-with-a-common-login-endpoint/304283
**Category:** SSO
**Tags:** openid-connect
**Created:** [September 1, 2023, 3:55pm UTC](https://meta.discourse.org/t/not-able-to-get-azure-ad-working-with-a-common-login-endpoint/304283 "2023-09-01T15:55:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Geoffrey\_Challen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/geoffrey_challen/32/119637_2.png) [@Geoffrey\_Challen](https://meta.discourse.org/u/Geoffrey_Challen)
#### Post date: [September 1, 2023, 3:55pm UTC](https://meta.discourse.org/t/not-able-to-get-azure-ad-working-with-a-common-login-endpoint/304283/1 "2023-09-01T15:55:31Z")

</div>

I’m currently not able to get Azure AD working with a common login endpoint.

I’m using the suggested discovery endpoint:

```plaintext
https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration

```

However, this redirects users to my organizational login page, not to the common Azure AD login page that allows using `@hotmail.com` and other Microsoft accounts. Note that my provider is configured to allow those accounts, and I’ve been able to use them using the same client using NextAuth, so I think that this does work.

I’m not sure if the solution is to use a different discovery document, or something else? Any help would be appreciated 🙂.

---

<div class="post-metadata">

### Author: ![sebix1](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sebix1](https://meta.discourse.org/u/sebix1)
#### Post date: [September 1, 2023, 3:58pm UTC](https://meta.discourse.org/t/not-able-to-get-azure-ad-working-with-a-common-login-endpoint/304283/2 "2023-09-01T15:58:00Z")

</div>

> [@Geoffrey\_Challen](#):
>
> `https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration`

Do you really use `{tenant}` or some actual tenant ID?

---

<div class="post-metadata">

### Author: ![Geoffrey\_Challen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/geoffrey_challen/32/119637_2.png) [@Geoffrey\_Challen](https://meta.discourse.org/u/Geoffrey_Challen)
#### Post date: [September 1, 2023, 4:47pm UTC](https://meta.discourse.org/t/not-able-to-get-azure-ad-working-with-a-common-login-endpoint/304283/3 "2023-09-01T16:47:58Z")

</div>

LOL. I replace that with my tenant ID 🙂. Otherwise I’m pretty sure it wouldn’t work at all…

---

<div class="post-metadata">

### Author: ![sebix1](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sebix1](https://meta.discourse.org/u/sebix1)
#### Post date: [September 1, 2023, 4:50pm UTC](https://meta.discourse.org/t/not-able-to-get-azure-ad-working-with-a-common-login-endpoint/304283/4 "2023-09-01T16:50:51Z")

</div>

Which one? The tenant `consumers` worked for us, while `common` didn’t.
