Enable users to log in using their Microsoft accounts (aka Office 365 or Microsoft 365 accounts)
Install Guide
This plugin is bundled with Discourse core. There is no need to install the plugin separately.
Summary
Microsoft Authentication enables users to log in to your Discourse forum using their Microsoft accounts (also known as Office 365 or Microsoft 365 accounts). This simplifies the login process for organizations that use Microsoft services.
Visit Certificates & secrets in the left sidebar menu and click New client secret
Add a simple description
Choose 24 months under âExpiresâ (note: youâll need to renew it)
Copy the Value (this is the Application Secret) and save it for your plugin settings
Visit Overview (in the left sidebar) and copy the Application (client ID)
In your Discourse admin area, go to Settings and search for âmicrosoft authâ
Enter the Application ID and Secret from the previous steps
Single-tenant authentication issues
If youâve configured your Microsoft application as single_tenant, some users may experience issues when logging in. This happens because the emails used for login are considered untrusted, and the system cannot automatically link them to existing Discourse accounts.
To resolve this issue, users can:
Look for the âAlready have an account?â section at the bottom of the signup form
Click the provided link to go through the account link-up process
Complete the authentication steps to connect their Microsoft account to their existing Discourse account
Another option is to enable the microsoft auth email verified site setting, if admins are confident that all your users have verified emails.This ensures that returning users with existing accounts donât create duplicate accounts when authenticating through Microsoft.
Additional configuration options
You can update all Microsoft Authentication settings by visiting the Admin > Settings area and searching for âmicrosoft authâ.
PoichĂŠ mi sono bloccato (di nuovo) durante lâaggiornamento della mia configurazione per questo plugin, ho creato questa PR:
Il problema è che il pannello dellâapp Microsoft offre tre campi dallâaspetto appropriato per il âSegretoâ: Client ID, Value e Secret ID. Senza indicazioni, ho scelto quello sbagliato in entrambe le occasioni in cui mi sono occupato di questo, e sospetto di non essere solo!
La parola âcommonâ è il problema.
Sembra che debba essere sostituita dallâID tenant per il tenant singolo.
Se hai un account MS, troverai il tuo ID tenant qui: Microsoft Azure
Non ho ancora provato a fare la modifica da solo. Forse lo farò.
In caso contrario, chiunque altro stia pensando di utilizzare questo per tenant singoli, non è necessario provare, attualmente non funzionerà .
Vedi lâimmagine allegata sotto come esempio del tipo di errore che otterrai.
Ok, non ho mai programmato con Ruby, ed è passato qualche anno da quando ho programmato e lavorato con cose tecniche. Ma, è fatto. E ora funziona anche per configurazioni Single Tenant.
Questo plugin è ora incluso nel core di Discourse come parte di Bundling more popular plugins with Discourse core. Se stai ospitando autonomamente e utilizzi il plugin, devi rimuoverlo dal tuo app.yml prima del tuo prossimo aggiornamento.