Overview
SAML SSO provides:- Single sign-on experience for users
- Centralized user authentication
- Reduced password fatigue
- Enhanced security through identity provider features (MFA, conditional access)
- Automatic user provisioning from identity provider
SAML support is built into Snipe-IT and uses the
onelogin/php-saml library.Prerequisites
Before configuring SAML, ensure you have:
- Access to your identity provider’s admin console
- Admin access to your Snipe-IT instance
- Understanding of basic SAML concepts (SP, IdP, metadata)
- HTTPS enabled on your Snipe-IT instance (required for production)
Configuration Overview
SAML configuration involves two main steps:- Configure Snipe-IT as a Service Provider (SP)
- Register Snipe-IT with your Identity Provider (IdP)
Step 1: Enable SAML in Snipe-IT
Web Interface Configuration
- Navigate to Admin > Settings > SAML
- Enable SAML authentication
- Configure the following settings:
Identity Provider Metadata
Provide your IdP metadata (either XML content or metadata URL):
- IdP Metadata: Paste the XML metadata from your identity provider, or
- IdP Metadata URL: Provide the URL to your IdP’s metadata endpoint
Attribute Mapping
Map SAML attributes to Snipe-IT user fields:
- Username Attribute: The SAML attribute containing the username (e.g.,
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name)
Environment Variables
You can also configure SAML via environment variables:.env
Step 2: Get Snipe-IT Metadata
Your identity provider will need Snipe-IT’s SAML metadata to complete the configuration.Download SP Metadata
- Navigate to Admin > Settings > SAML
- Click Download Metadata button, or
- Access the metadata URL directly:
Key SP Metadata Values
Your IdP will typically need these values:- Entity ID:
https://your-snipe-it-instance.com - ACS URL (Assertion Consumer Service):
https://your-snipe-it-instance.com/saml/acs - SLS URL (Single Logout Service):
https://your-snipe-it-instance.com/saml/sls - NameID Format:
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress(or as configured)
Identity Provider Setup
Microsoft Azure AD (Entra ID)
Create Enterprise Application
- Sign in to Azure Portal
- Navigate to Azure Active Directory > Enterprise Applications
- Click + New application
- Click + Create your own application
- Enter name: “Snipe-IT”
- Select Integrate any other application you don’t find in the gallery
- Click Create
Configure SAML
- In the Snipe-IT application, go to Single sign-on
- Select SAML
- Configure the following:
- Identifier (Entity ID):
https://your-snipe-it-instance.com - Reply URL (ACS):
https://your-snipe-it-instance.com/saml/acs - Logout URL:
https://your-snipe-it-instance.com/saml/sls
- Unique User Identifier:
user.userprincipalnameoruser.mail
- Download the Federation Metadata XML
- Upload this XML to Snipe-IT’s IdP Metadata field
Okta
Create SAML Application
- Sign in to Okta Admin Console
- Navigate to Applications > Applications
- Click Create App Integration
- Select SAML 2.0
- Click Next
Configure SAML Settings
General Settings:
- App name: “Snipe-IT”
- Single sign-on URL:
https://your-snipe-it-instance.com/saml/acs - Audience URI (SP Entity ID):
https://your-snipe-it-instance.com - Name ID format:
EmailAddress - Application username:
Email
- firstName:
user.firstName - lastName:
user.lastName - email:
user.email
Get Metadata
- After creating the app, go to Sign On tab
- Scroll to SAML Signing Certificates
- Copy the Metadata URL or download the metadata XML
- Add this metadata to Snipe-IT’s IdP Metadata field
Google Workspace
Add Custom SAML App
- Sign in to Google Admin Console
- Navigate to Apps > Web and mobile apps
- Click Add app > Add custom SAML app
- Enter app name: “Snipe-IT”
- Click Continue
Download IdP Metadata
- On the Google IdP information page
- Click Download Metadata
- Save the XML file
- Click Continue
Configure Service Provider Details
ACS URL:
https://your-snipe-it-instance.com/saml/acs
Entity ID: https://your-snipe-it-instance.com
Start URL: https://your-snipe-it-instance.com (optional)
Name ID: Basic Information > Primary email
Name ID format: EMAILClick ContinueAttribute Mapping
Google Directory attributes → App attributes:
- Primary email →
email - First name →
firstName - Last name →
lastName
OneLogin
Add Application
- Log in to OneLogin Admin Portal
- Navigate to Applications > Applications
- Click Add App
- Search for “SAML Test Connector (IdP w/ attr)”
- Click on it and give it a display name: “Snipe-IT”
- Click Save
Configure SSO
- Go to Configuration tab
- Set:
- Audience:
https://your-snipe-it-instance.com - ACS (Consumer) URL:
https://your-snipe-it-instance.com/saml/acs - Single Logout URL:
https://your-snipe-it-instance.com/saml/sls
- Audience:
- Click Save
Testing SAML
Initial Test
- Open an incognito/private browser window
- Navigate to your Snipe-IT instance
- Click Login with SAML (or the configured SSO button)
- You should be redirected to your IdP
- Log in with your IdP credentials
- You should be redirected back to Snipe-IT and logged in
Troubleshooting
SAML Login Button Not Showing
SAML Login Button Not Showing
Redirect Loop or 403 Error
Redirect Loop or 403 Error
- Verify ACS URL matches exactly in both Snipe-IT and IdP
- Check that
APP_URLin.envmatches your actual URL - Ensure HTTPS is enabled if IdP requires it
- Verify time sync between Snipe-IT server and IdP (use NTP)
User Not Found Error
User Not Found Error
- Check username attribute mapping in Snipe-IT SAML settings
- Users must exist in Snipe-IT before SAML login (auto-provisioning not supported)
- Create user manually with matching username first
- Verify the attribute being sent by IdP in SAML response
Certificate Errors
Certificate Errors
- Ensure IdP certificate is valid and not expired
- Check system time on Snipe-IT server
- Verify metadata is up to date
- Re-download IdP metadata if certificate has been renewed
Debugging SAML Responses
Debugging SAML Responses
Enable debug logging:
- Set
APP_DEBUG=truein.env(temporarily) - Check
storage/logs/laravel.logfor detailed SAML errors - Use browser developer tools to inspect SAML response
- Use SAML debugging tools like SAML-tracer (browser extension)
Advanced Configuration
Custom SAML Settings
You can add custom SAML settings in the admin interface under Custom SAML Settings. Each setting should be on a new line in the formatkey=value.
Example custom settings:
Forcing SAML Authentication
To require SAML for all users (disable local login):.env
Single Logout (SLO)
Snipe-IT supports SAML Single Logout. When a user logs out of Snipe-IT, they will also be logged out of the identity provider (if configured). The SLS (Single Logout Service) endpoint is:User Provisioning
Snipe-IT does not currently support automatic user provisioning via SAML. Users must be created in Snipe-IT before they can log in via SAML.
- Manual Creation: Create users manually in Snipe-IT with usernames matching the SAML NameID
- LDAP Sync: Use LDAP sync to import users, then use SAML for authentication
- API Import: Use the API to programmatically create users
- SCIM: Some organizations use SCIM for automated provisioning (advanced)
Security Best Practices
Use HTTPS
Always use HTTPS in production. SAML should never be used over HTTP.
Sign Requests
Generate SP certificates and enable request signing for enhanced security.
Validate Certificates
Ensure IdP certificates are valid and from trusted sources.
Keep Metadata Updated
Regularly update IdP metadata when certificates are renewed.
Monitor Logs
Regularly review authentication logs for suspicious activity.
Emergency Access
Maintain a local admin account for emergency access if SAML fails.
Next Steps
LDAP Integration
Sync users from Active Directory
User Management
Manage user permissions and groups
