# Discourse-azure-oauth2 -- version token support

**URL:** https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346
**Category:** Support
**Created:** [January 12, 2019, 7:16am UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346 "2019-01-12T07:16:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Subham\_Joshi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/subham_joshi/32/127591_2.png) [@Subham\_Joshi](https://meta.discourse.org/u/Subham_Joshi)
#### Post date: [January 12, 2019, 7:16am UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/1 "2019-01-12T07:16:47Z")

</div>

If we create app from **app registration** , it creates **version1 token** and if we create app from **app registration (preview)** it creates **version2 token**.

We are using this plugin - **discourse-azure-oauth2**

Is this plugin support both version tokens and how?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 12, 2019, 8:35am UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/2 "2019-01-12T08:35:40Z")

</div>

> [@Discourse OpenID Connect (OIDC)](https://meta.discourse.org/t/discourse-openid-connect-oidc/103632/10):
>
> Make sure you use v2.0 of the configuration endpoint as per the notes above. The default **v1.0 endpoint does not support email or profile scope**.

Says here to make sure you use V2.

---

<div class="post-metadata">

### Author: ![Subham\_Joshi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/subham_joshi/32/127591_2.png) [@Subham\_Joshi](https://meta.discourse.org/u/Subham_Joshi)
#### Post date: [January 15, 2019, 10:20am UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/3 "2019-01-15T10:20:43Z")

</div>

Hi @codinghorror,

Thanks for the reply, we make sure that we will use V2 token.

We need to integrate discourse with Azure AD B2C application with Oauth2 authentication using **discourse-azure-oauth2**.

Are there any steps for integrating discourse with B2C applications Azure AD.

**Scenario** - If any external user wants to login/register, an user account should be created with that application in azure AD B2C.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 15, 2019, 10:30am UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/4 "2019-01-15T10:30:08Z")

</div>

For Azure B2C, I think you will have more success using the generic [Discourse OpenID Connect (OIDC) - #10](https://meta.discourse.org/t/openid-connect-authentication-plugin/103632/10) rather than **azure-oauth2**. The discovery document URL details can be found here: [Web sign in with OpenID Connect - Azure AD B2C | Microsoft Learn](https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-oidc)

> [@](#):
>
> For example, the metadata document for the `b2c_1_sign_in` user flow in `fabrikamb2c.onmicrosoft.com` is located at:
> 
> `https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=b2c_1_sign_in`

---

<div class="post-metadata">

### Author: ![Subham\_Joshi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/subham_joshi/32/127591_2.png) [@Subham\_Joshi](https://meta.discourse.org/u/Subham_Joshi)
#### Post date: [January 15, 2019, 10:37am UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/5 "2019-01-15T10:37:44Z")

</div>

Thanks @david,

Will try to integrate Azure B2C with discourse using [OpenID Connect Authentication Plugin](https://meta.discourse.org/t/openid-connect-authentication-plugin/103632/10)

Will ask query, if we got any issues.  
Thanks guys.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 30, 2021, 4:27pm UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/6 "2021-12-30T16:27:27Z")

</div>



---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [December 30, 2021, 5:16pm UTC](https://meta.discourse.org/t/discourse-azure-oauth2-version-token-support/106346/7 "2021-12-30T17:16:30Z")

</div>


