Actualizar Azure AD con variables correctas (AZURE_TENANT, AZURE_APP_ID, AZURE_APP_SECRET)
@@ -69,7 +69,47 @@ SAML2_AUTOLOAD_METADATA=true
|
||||
|
||||
---
|
||||
|
||||
## OAuth (Google, GitHub, GitLab)
|
||||
## OAuth (Google, GitHub, GitLab, Azure AD)
|
||||
|
||||
### Azure AD (Microsoft Entra ID)
|
||||
|
||||
1. Registra aplicación en [Azure Portal](https://portal.azure.com/) → **Azure Active Directory** → **App registrations**
|
||||
2. **New registration**:
|
||||
- **Name**: BookStack
|
||||
- **Supported account types**: Single tenant
|
||||
- **Redirect URI**: `https://bookstack.tudominio.com/login/service/azure/callback`
|
||||
3. Anota **Application (client) ID** y **Directory (tenant) ID**
|
||||
4. En **Certificates & secrets**, crea **New client secret** y anótalo
|
||||
5. En **API permissions**, añade:
|
||||
- **Microsoft Graph** → **Delegated permissions** → `User.Read`, `email`, `openid`, `profile`
|
||||
- Click **Grant admin consent**
|
||||
|
||||
**Añade al .env**:
|
||||
|
||||
```env
|
||||
# Azure AD OAuth
|
||||
AZURE_TENANT=tu-tenant-id
|
||||
AZURE_APP_ID=tu-application-client-id
|
||||
AZURE_APP_SECRET=tu-client-secret
|
||||
AZURE_AUTO_REGISTER=true
|
||||
AZURE_AUTO_CONFIRM_EMAIL=true
|
||||
```
|
||||
|
||||
**Reinicia**:
|
||||
```bash
|
||||
docker restart bookstack
|
||||
```
|
||||
|
||||
**Opciones adicionales**:
|
||||
|
||||
```env
|
||||
# Sincronizar grupos de Azure AD (opcional)
|
||||
AZURE_USER_TO_GROUPS=true
|
||||
AZURE_GROUPS_CLAIM=groups
|
||||
AZURE_REMOVE_FROM_GROUPS=true
|
||||
```
|
||||
|
||||
> ℹ️ **Nota**: Para sincronización de grupos, añade en Azure AD **Token configuration** el claim `groups`.
|
||||
|
||||
### Google OAuth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user