Skip to main content
Snipe-IT supports LDAP and Active Directory integration for user authentication and synchronization. This allows you to:
  • Authenticate users against your corporate directory
  • Automatically import user information
  • Keep user data synchronized
  • Leverage existing directory groups

Prerequisites

Before configuring LDAP, ensure you have:
  • LDAP/AD server hostname or IP address
  • LDAP bind user credentials (service account)
  • Base DN for your directory
  • Network connectivity from Snipe-IT to your LDAP server
  • PHP LDAP extension installed (php-ldap)

Configuration

1. Enable LDAP

Navigate to Admin > Settings > LDAP in the Snipe-IT interface.

2. Basic LDAP Settings

1

Server Configuration

Configure your LDAP server connection:
  • LDAP Server: Hostname or IP (e.g., ldap.example.com or 192.168.1.10)
  • LDAP Port: Usually 389 for LDAP or 636 for LDAPS
  • LDAP Version: Typically 3
  • Base DN: Your directory base (e.g., dc=example,dc=com)
2

Bind Credentials

Provide credentials for a service account with read access to your directory:
  • LDAP Bind Username: Full DN (e.g., cn=snipeit,ou=service,dc=example,dc=com)
  • LDAP Bind Password: Password for the bind user
3

User Filter

Define which users to import:
  • LDAP Filter: Filter query (e.g., (&(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))))

Environment Variables

You can also configure LDAP settings via environment variables in your .env file:
.env

Field Mapping

Map LDAP attributes to Snipe-IT user fields:
The exact attribute names may vary depending on your LDAP schema. Consult your directory administrator for the correct attribute names.

Active Directory Examples

Standard Active Directory Configuration

.env

Active Directory with LDAPS (Secure)

.env

Active Directory - Specific OU Only

.env

OpenLDAP Examples

Standard OpenLDAP Configuration

.env

LDAP Authentication

When LDAP authentication is enabled, Snipe-IT will:
  1. Check if the username exists in the local database
  2. If found and LDAP is enabled, authenticate against LDAP
  3. If authentication succeeds, update the user’s information from LDAP
  4. If the user doesn’t exist locally, they must be imported via LDAP sync first

Authentication Filter

You can specify an additional authentication filter to restrict which LDAP users can log in:
.env

Importing Users

Manual Import via Web Interface

  1. Navigate to Admin > Users
  2. Click LDAP Sync button
  3. Optionally select a default location for imported users
  4. Click Synchronize
  5. Review the import summary

Command Line Import

You can import users via the command line:

Scheduled LDAP Sync

To automatically sync users on a schedule, add a cron job:
crontab

Troubleshooting

Use the built-in LDAP test tool:
  1. Navigate to Admin > Settings > LDAP
  2. Click Test LDAP Connection
  3. Review the test results
You can also test via API:
Cannot connect to LDAP server:
  • Verify network connectivity: telnet ldap.example.com 389
  • Check firewall rules
  • Ensure correct hostname/IP and port
  • Verify LDAP service is running
Certificate verification failed:
  • For testing, temporarily set LDAP_SERVER_CERT_IGNORE=true
  • For production, install proper CA certificates
  • Verify certificate CN matches server hostname
Users cannot log in:
  • Verify users have been imported first (LDAP sync)
  • Check the authentication filter is not too restrictive
  • Verify bind user credentials are correct
  • Check user’s account is enabled in AD/LDAP
  • Review Snipe-IT logs: storage/logs/laravel.log
Wrong user information:
  • Verify field mappings match your LDAP schema
  • Re-run LDAP sync to update user data
No users imported:
  • Verify LDAP filter syntax
  • Check base DN is correct
  • Ensure bind user has read permissions
  • Review error messages in web interface or command output
Duplicate users:
  • Check if users exist with different usernames
  • Verify username field mapping is correct
  • Snipe-IT matches on username field

Security Best Practices

Use LDAPS

Always use LDAPS (port 636) in production to encrypt credentials in transit.

Dedicated Service Account

Create a dedicated LDAP service account with read-only permissions for Snipe-IT.

Restrict Base DN

Use the most specific base DN possible to limit the directory scope.

Filter Carefully

Use LDAP filters to import only necessary users and exclude disabled accounts.

Advanced Configuration

Client TLS Certificates

If your LDAP server requires client certificates:
.env

Default Group for LDAP Users

Assign imported LDAP users to a specific Snipe-IT group:
.env

Password Synchronization

Allow LDAP users to change their Snipe-IT password (not recommended if using LDAP auth):
.env

Next Steps

SAML SSO

Configure enterprise single sign-on

User Management

Learn about user permissions and groups