We need to integrate the discourse with Azure AD using discourse-azure-ad plugin.
Configuration on discourse -
- Add the plugin Github link inside the app.yml file inside the containers directory.
- Add the Azure application client Id as
DISCOURSE_AZURE_CLIENT_ID
in app.yml. - Add the Azure application client secret as
DISCOURSE_AZURE_CLIENT_SECRET
in app.yml.
Re-build/Re-deploy the discourse image in docker.
Configuration on Azure AD -
- Login to azure portal, select “Azure Active Directory” from main left side menu.
- Click on “App Registrations” & a wizard form opens.
- Select “New registration” from top sub header.
- Give a name & Select supported account types.
- Now select the newly created application inside App registrations & open it.
- Select 'Authentication" from left sub-menu.
- Now add the redirect url as callback url
https://discourse-domain/auth/azure_oauth2/callback
& hit save. - Check Implicit grand as “Access Token”.
- Select the “Certifications & secrets” from left sub-menu & create one client secrets.
- For adding a new secret key, give a description & expiry time.
- Select “API Permissions” and check if Microsoft graph user.read permission (Sign in and read user profile) is available.
But we are not able to logged in.
When we tried logging in, it redirects to login.microsoft for login.
but after entering credentials - it came back to the callback url & refreshes for forever.(it reloads the page with various callback urls.)
Please help.