The LDAP (Lightweight Directory Access Protocol) integration for MultiPortal enables centralized user authentication and management through your organization's directory services such as Active Directory or OpenLDAP. This feature streamlines user onboarding, enforces consistent access control, and reduces administrative overhead by synchronizing user credentials and roles from your existing directory infrastructure.
| Directory Type | Description | Common Use Cases |
|---|---|---|
| Active Directory | Microsoft's directory service for Windows domain networks | Enterprise Windows environments, Office 365 integration |
| OpenLDAP | Open-source LDAP implementation | Linux/Unix environments, mixed OS deployments |
LDAP configurations can be created and managed at three levels:
Important: Each level can only view and manage their own LDAP configurations. Lower tiers cannot access configurations from higher tiers.
# Generate LDAP encryption key (run once during installation)
./yii generate-ldap-key
Note: The encryption key generation is a one-time setup performed by system administrators. This ensures all LDAP credentials are securely encrypted in the database.
| Field | Description | Example |
|---|---|---|
| LDAP Code | Unique identifier for multi-tenant login (similar to SAML) | ACME-CORP |
| Domain | Email domain for user authentication | example.com |
| Type | LDAP server type | Active Directory / OpenLDAP |
| Server | LDAP server hostname or IP address | ldap.example.com or 192.168.1.100 |
| Port | LDAP server port (389 for LDAP, 636 for LDAPS) | 389 or 636 |
| Use SSL/TLS | Enable encrypted connection (recommended) | Yes/No |

| Field | Description | Example |
|---|---|---|
| Base DN | Root of directory tree to search | dc=example,dc=com |
| User Base DN | Specific location for user objects | ou=users,dc=example,dc=com |
| Group Base DN | Specific location for group objects | ou=groups,dc=example,dc=com |
Security Note: The service account credentials are securely encrypted and stored. They are used only for reading information from the LDAP directory and do not provide full administrative access.
| Field | Description | Example |
|---|---|---|
| Username | LDAP account with read access to directory | cn=srv-mp-ldap,dc=example,dc=com |
| Password | Password for service account | [encrypted in database] |
| MultiPortal Field | LDAP Attribute | Description |
|---|---|---|
| Username | sAMAccountName | User's login name |
| User's email address | ||
| First Name | givenName | User's first name |
| Last Name | sn | User's surname |
| Groups | memberOf | User's group memberships |
| MultiPortal Field | LDAP Attribute | Description |
|---|---|---|
| Username | uid | User's login name |
| User's email address | ||
| First Name | givenName | User's first name |
| Last Name | sn | User's surname |
| Groups | memberOf | User's group memberships |
Note: OpenLDAP configurations automatically disable the email field requirement as the username (uid) is used for authentication.
Import Settings (previously called "Sync Roles") allows you to map LDAP groups to MultiPortal roles. When a user logs in via LDAP, MultiPortal automatically assigns roles based on their group memberships.
[Insert Screenshot: Import Settings Section]
| Field | Description | Example |
|---|---|---|
| LDAP Group | Select group from LDAP directory | CN=Administrators,OU=Groups,DC=example,DC=com |
| MultiPortal Role | Role to assign to group members | Administrator, Support Staff, Sales, etc. |
[Insert Screenshot: Create Import Setting Form]
You can create multiple import settings to map different LDAP groups to different roles:
| LDAP Group | MultiPortal Role | Purpose |
|---|---|---|
| CN=IT-Admins,OU=Groups,DC=example,DC=com | Administrator | Full system access |
| CN=Support-Team,OU=Groups,DC=example,DC=com | Support Staff | Customer support functions |
| CN=Sales-Team,OU=Groups,DC=example,DC=com | Sales | Sales-related features |
| CN=Billing-Team,OU=Groups,DC=example,DC=com | Billing Manager | Billing and invoicing |
Important: If a user belongs to multiple LDAP groups with different role mappings, the system uses the first matching group found in the import settings.
The LDAP Code feature enables multi-tenant environments where multiple organizations use LDAP authentication. This is similar to the SAML code implementation and allows users to specify which LDAP configuration to use during login.
When creating or editing an LDAP configuration, specify a unique LDAP Code:
[Insert Screenshot: Main Login Page with "Login with LDAP" Button]
User enters the following credentials:
| Field | Description | Example |
|---|---|---|
| LDAP Code | Organization's LDAP identifier | ACME-CORP |
| Username | LDAP username or email | jdoe@example.com or jdoe |
| Password | LDAP password | [user's LDAP password] |
[Insert Screenshot: LDAP Login Form]
Users can log in using their full email address:
For OpenLDAP configurations, users can authenticate with username only:
When a user logs in via LDAP for the first time:
Automatic User Creation: No manual user creation required. Users are automatically provisioned upon first successful LDAP login.
For returning users:
Common Login Errors:
./yii generate-ldap-key| User Level | Can View | Can Create | Can Edit | Can Delete |
|---|---|---|---|---|
| Service Provider Admin | Own configs only | Yes | Yes | Yes |
| Reseller Admin | Own configs only | Yes | Yes | Yes |
| Tenant Admin | Own configs only | Yes | Yes | Yes |
A: Yes. LDAP authentication is an additional option. Users can still authenticate using local MultiPortal credentials. The authentication flow checks LDAP first (if configured), then falls back to local authentication if needed.
A: Users will receive a connection error message. Local MultiPortal accounts will still function normally. LDAP users will need to wait until server connectivity is restored.
A: Yes. Each company (Service Provider, Reseller, or Tenant) can configure their own LDAP connection, even to the same server. Use different Base DNs or LDAP codes to differentiate.
A: No. Users are automatically created in MultiPortal upon first successful LDAP login. Import settings determine their initial roles.
A: The main differences are attribute mappings and authentication methods:
A: SSL/TLS encrypts all communication between MultiPortal and the LDAP server, including user credentials during authentication. This prevents credential interception and ensures secure data transmission.
A: Yes, but each must have a unique LDAP code. Users will need to specify which configuration to use via the code-based login.
A: The configuration and all associated import settings are deleted. Existing users created via that LDAP configuration remain in the system but can no longer authenticate via LDAP. They would need local MultiPortal credentials or be associated with a different LDAP configuration.
A: No. LDAP users must change their passwords through your organization's directory service (Active Directory, OpenLDAP, etc.). MultiPortal does not modify LDAP directory data.
A: The system uses the first matching group found in your import settings. Order your import settings carefully to ensure correct role assignment.
A: Roles are synchronized during each login. If a user's group memberships change in LDAP, they need to log out and log back in for role changes to take effect.
A: IP-based restrictions would need to be configured at the LDAP server level or through firewall rules. MultiPortal itself does not provide IP-based LDAP access control.
A: This means the user successfully authenticated to LDAP, but none of their LDAP group memberships match any configured import settings. Solution:
A: User login failures could be due to:
Contact your administrator to verify configuration and user details.
A: This error occurs when the email domain in the username doesn't match the configured domain. Solutions:
A: Yes. MultiPortal supports multiple authentication methods simultaneously. Users can choose their preferred method (local, LDAP, SAML, or SSO) from the login page.
A: Yes. During login, MultiPortal retrieves and updates:
A: LDAP is primarily designed for web interface login. API authentication typically uses API keys or tokens. Check API documentation for available authentication methods.
A:
A: The current implementation uses standard attribute mappings for Active Directory and OpenLDAP. Custom attribute mapping would require code modifications. Contact support if you have specific requirements.
A: The current implementation reads direct group memberships. Nested group support (groups within groups) may be added in future releases based on customer demand.
A: Direct API endpoints for LDAP configuration are not currently exposed. Configuration must be done through the web interface. Contact development team if you have automation requirements.