Skip to content

Implement Azure AD multi-user sign-in support#5303

Open
alokas wants to merge 1 commit into
Mintplex-Labs:masterfrom
alokas:master
Open

Implement Azure AD multi-user sign-in support#5303
alokas wants to merge 1 commit into
Mintplex-Labs:masterfrom
alokas:master

Conversation

@alokas
Copy link
Copy Markdown

@alokas alokas commented Mar 30, 2026

  • 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.

#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

  • ✨ feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

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)

tempImageO3nl2F
tempImage6SkwGY

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • [] Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

yarn 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.

- 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.
@alokas
Copy link
Copy Markdown
Author

alokas commented Mar 30, 2026

solves #1193 partially, (Azure AD Only)

@alokas
Copy link
Copy Markdown
Author

alokas commented Mar 30, 2026

Docker image for testing has been uploaded to alokas/anythingllm-azure if you want to test it.

@timothycarambat
Copy link
Copy Markdown
Member

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

@timothycarambat timothycarambat added enhancement New feature or request blocked PR:needs review Needs review by core team labels Mar 30, 2026
@alokas
Copy link
Copy Markdown
Author

alokas commented Mar 31, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked enhancement New feature or request PR:needs review Needs review by core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Single Sign-On (SSO) Authentication with Azure Active Directory, GitHub, and Google

2 participants