# Discourse, SSO and Microsoft Azure

**URL:** https://meta.discourse.org/t/discourse-sso-and-microsoft-azure/315002
**Category:** SSO
**Created:** [July 4, 2024, 12:48pm UTC](https://meta.discourse.org/t/discourse-sso-and-microsoft-azure/315002 "2024-07-04T12:48:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![honzao](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@honzao](https://meta.discourse.org/u/honzao)
#### Post date: [July 4, 2024, 12:48pm UTC](https://meta.discourse.org/t/discourse-sso-and-microsoft-azure/315002/1 "2024-07-04T12:48:06Z")

</div>

Hello,  
I am trying to make working SSO for our Discourse instance using this plugin - [GitHub - discourse/discourse-oauth2-basic: A basic OAuth2 plugin for use with Discourse · GitHub](https://github.com/discourse/discourse-oauth2-basic)

JSON User Endpoint is what is blocking me right now. If I am reading Microsoft’s documentation correctly, there is a UserInfo endpoint [Microsoft identity platform UserInfo endpoint - Microsoft identity platform | Microsoft Learn](https://learn.microsoft.com/en-us/entra/identity-platform/userinfo) , but “response” part of the documentation says

### UserInfo response

```plaintext
{
    "sub": "OLu859SGc2Sr9ZsqbkG-QbeLgJlb41KcdiPoLYNpSFA",
    "name": "Mikah Ollenburg", // all names require the “profile” scope.
    "family_name": " Ollenburg",
    "given_name": "Mikah",
    "picture": "https://graph.microsoft.com/v1.0/me/photo/$value",
    "email": "mikoll@contoso.com" // requires the “email” scope.
}

```

The claims shown in the response are all those that the UserInfo endpoint can return.

Do I understand correctly these are all the attributes this endpoint can return, therefore it cannot be used in configuration of OAuth plugin, because there is for example missing information about username?

Did anyone else made working SSO solution for Discourse based on Microsoft Azure services?

Many thanks

---

<div class="post-metadata">

### Author: ![honzao](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@honzao](https://meta.discourse.org/u/honzao)
#### Post date: [July 11, 2024, 11:49am UTC](https://meta.discourse.org/t/discourse-sso-and-microsoft-azure/315002/2 "2024-07-11T11:49:06Z")

</div>

Anyone? Any help would be appreciated.

Thank you
