# Official support for Microsoft Azure AD?

**URL:** https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626
**Category:** Self-hosting
**Created:** [August 13, 2018, 6:16pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626 "2018-08-13T18:16:53Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![cgambino](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@cgambino](https://meta.discourse.org/u/cgambino)
#### Post date: [August 13, 2018, 6:16pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/1 "2018-08-13T18:16:53Z")

</div>

Hi everyone,

I am looking for information on if Azure AD is supported through an Official plugin. We have been attempting to use the OAuth2\_Basic plugin, and it’s connecting and coming back, but we get an “unauthorized” user.

I’m wondering if anyone has sample settings for the OAuth2\_Basic plugin to work with Azure AD, or if there is another official plugin and the settings for that as well.

Thanks for the help!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 13, 2018, 6:30pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/2 "2018-08-13T18:30:11Z")

</div>

We do have [GitHub - discourse/discourse-azure-ad · GitHub](https://github.com/discourse/discourse-azure-ad)

---

<div class="post-metadata">

### Author: ![cgambino](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@cgambino](https://meta.discourse.org/u/cgambino)
#### Post date: [August 13, 2018, 6:42pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/3 "2018-08-13T18:42:36Z")

</div>

Is this an Official Plugin? Installing it exploded with this error:

```
I, [2018-08-13T18:40:35.703008 #13] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
rake aborted!
NoMethodError: undefined method `azure_client_id' for GlobalSetting:Class

I, [2018-08-13T18:40:56.543410 #13] INFO -- : Terminating async processes
I, [2018-08-13T18:40:56.543611 #13] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 68
I, [2018-08-13T18:40:56.543885 #13] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 184
2018-08-13 18:40:56.544 UTC [68] LOG: received fast shutdown request
184:signal-handler (1534185656) Received SIGTERM scheduling shutdown...
2018-08-13 18:40:56.547 UTC [68] LOG: aborting any active transactions
2018-08-13 18:40:56.549 UTC [68] LOG: worker process: logical replication launcher (PID 77) exited with exit code 1
2018-08-13 18:40:56.552 UTC [72] LOG: shutting down
2018-08-13 18:40:56.569 UTC [68] LOG: database system is shut down
184:M 13 Aug 18:40:56.642 # User requested shutdown...
184:M 13 Aug 18:40:56.642 * Saving the final RDB snapshot before exiting.
184:M 13 Aug 18:40:56.657 * DB saved on disk
184:M 13 Aug 18:40:56.657 # Redis is now ready to exit, bye bye...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 388 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
196c9549fb8583350329133c12aa0d0854e46c4c273e24fe1185b26873a965c5
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one
[root@ip-10-20-40-33 discourse]#

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 13, 2018, 6:44pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/4 "2018-08-13T18:44:03Z")

</div>

Did you follow the README instructions? Adding the ENV variables, etc ?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 14, 2018, 1:01am UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/5 "2018-08-14T01:01:01Z")

</div>

> [@cgambino](#):
>
> NoMethodError: undefined method `azure\_client\_id’ for GlobalSetting:Class

Yeah you are missing an env var for `DISCOURSE_AZURE_CLIENT_ID` we should clean the failure mode up here.

---

<div class="post-metadata">

### Author: ![cgambino](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@cgambino](https://meta.discourse.org/u/cgambino)
#### Post date: [August 14, 2018, 5:03pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/6 "2018-08-14T17:03:11Z")

</div>

Thanks to you both, completely missed that and misunderstood the instructions. Made these changes and it worked.

---

<div class="post-metadata">

### Author: ![abelmokadem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abelmokadem/32/135596_2.png) [@abelmokadem](https://meta.discourse.org/u/abelmokadem)
#### Post date: [November 21, 2019, 5:19pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/7 "2019-11-21T17:19:07Z")

</div>

As part of official support for Microsoft Azure AD I think it would be a good idea to request a “Gallery App” in Azure:

> **[Submit a request to publish your application - Microsoft Entra ID](https://learn.microsoft.com/en-gb/azure/active-directory/develop/howto-app-gallery-listing)**
>
> Learn how to publish your application in Microsoft Entra application gallery.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [September 2, 2021, 5:59pm UTC](https://meta.discourse.org/t/official-support-for-microsoft-azure-ad/94626/8 "2021-09-02T17:59:18Z")

</div>

Is this plugin still useful or is it sufficient to use [Discourse OpenID Connect (OIDC)](https://meta.discourse.org/t/openid-connect-authentication-plugin/103632) to allow logging into Discourse using Azure Active Directory?

> **[OpenID Connect authentication with Microsoft Entra ID - Microsoft Entra](https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/auth-oidc)**
>
> Architectural guidance on achieving OpenID Connect authentication with Microsoft Entra ID.

> **[SaaS App configuration guides for Microsoft Entra ID - Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity/saas-apps/tutorial-list)**
>
> Configure Microsoft Entra single sign-on integration with a variety of third-party software as a service application.
