The API uses your corporate Active Directory account for authentication — no separate API credentials are required. When you POST your username and password toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AC42027/Backend-produccion/llms.txt
Use this file to discover all available pages before exploring further.
/api/login-ldap/, the server binds to the LDAP server using those credentials, searches for your user record, and issues a session cookie that authorizes all subsequent requests.
How it works
LDAP validation
The server connects to the configured LDAP server using your credentials (
username@DOMAIN). A successful bind confirms the password is correct. The server then searches your directory entry using sAMAccountName and retrieves your profile attributes.User record sync
Django automatically creates or updates a local
User record with your first_name, last_name, and email from Active Directory. This happens on every login.Login request
Request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Your Active Directory sAMAccountName (e.g. ac12345) |
password | string | Yes | Your Active Directory password |
Success response
sessionid cookie is set automatically by the server.
Using the session cookie
After a successful login, send thesessionid cookie on every subsequent request. With curl, use -b cookies.txt to replay the cookie jar saved during login:
credentials: 'include' in your fetch options.
LDAP attributes fetched
During login, the server retrieves the following Active Directory attributes for your user account:| Attribute | Description |
|---|---|
givenName | First name |
sn | Last name (surname) |
mail | Email address |
userPrincipalName | UPN / login email (used as email field) |
title | Job title |
manager | Manager’s distinguished name |
memberOf | List of group DNs the user belongs to |
Only
first_name, last_name, and email are persisted to Django’s User model. The remaining attributes (title, manager, memberOf) are retrieved but not stored.Error responses
| HTTP status | status | message | Cause |
|---|---|---|---|
401 | error | Credenciales inválidas | Wrong username or password |
400 | error | Formato JSON inválido | Request body is not valid JSON |
405 | error | Método no permitido. Se requiere POST. | Request used GET or another non-POST method |