Implement Azure AD multi-user sign-in support#5303
Conversation
- Added Azure AD login functionality in the MultiUserAuth component. - Introduced new API endpoint for Azure token exchange. - Updated system settings to include Azure AD configuration. - Enhanced user model to support federated identity and external IDs. - Updated .env.example with Azure AD environment variables. - Added translations for Azure login button.
|
solves #1193 partially, (Azure AD Only) |
|
Docker image for testing has been uploaded to |
|
Can we get some instructions on how a user would setup this integration? Adding all of these keys will certainly confuse people and this is a super powerful feature but without docs (anythingllm-docs) on how to set this up it is going to open a lot of issues from people not knowing all the ins-and-outs of how to get these keys |
Mintplex-Labs/anythingllm-docs#227 Added - hope this is fine. |
#Set AZURE_AD_ENABLED=false to disable without removing other vars.
#AZURE_AD_TENANT_ID=
#AZURE_AD_CLIENT_ID=
#AZURE_AD_REDIRECT_URI=http://localhost:3000/
#Optional: force new Azure users into a specific workspace id (must exist).
#AZURE_AD_DEFAULT_WORKSPACE_ID=
#Optional: custom text for login button (default: "Sign in with Entra ID")
#AZURE_AD_BUTTON_TEXT="Sign in with Microsoft"
#Optional: hide local username/password fields and show Azure button only.
#Accepted truthy values: 1, true, yes
#AZURE_AD_HIDE_PASSWORD_LOGIN=false
#Optional bootstrap admin username when Azure env triggers first-time multi-user enablement.
#AZURE_BOOTSTRAP_ADMIN_USERNAME=admin
Pull Request Type
Relevant Issues
resolves #1193
I also added "Auto Multi User provisioning (and default workspace creation) using environment variables - the password is auto generated
The UI was changed to show only Azure AD (with custom message, that can be set using the Environment Variable) and also it can work in local login + Azure AD mode
Description
Doing an Azure AD (Entra ID) authentication with SIMPLE_SSO was very difficult. I tried it with oauth2-Proxy, as sometimes azure ad sent mixed case email addresses and so on and so forth forth - I have added the SPA frame work
Visuals (if applicable)
Additional Information
Developer Validations
yarn lintfrom the root of the repo & committed changesyarn run v1.22.22
$ cd server && yarn lint && cd ../frontend && yarn lint && cd ../collector && yarn lint
$ eslint --fix .
$ eslint --fix src
$ eslint --fix .
✨ Done in 18.65s.