Odoo LDAP and Active Directory authentication

Odoo can check passwords against an LDAP directory, including Active Directory, and create user profiles on first login from a template user. This page covers the settings, the checks that prove each step works, and where LDAP falls short of SAML or OIDC.

On this page

How Odoo LDAP authentication works with Active Directory

A company that runs self-hosted Odoo often wants staff to sign in with the same password they use on their Windows workstation. Odoo's LDAP authentication covers that need. It is enabled in Settings under Integrations and configured per company, and when a user signs in, Odoo checks the submitted credentials against the directory. Active Directory is reached through its LDAP interface, so the Odoo side needs the directory server address and port, an optional StartTLS setting, a bind account that Odoo uses to search the directory, an LDAP base (the search base where user accounts live), and a filter such as uid=%s. The bind account can be a dedicated, least-privilege service account with a password, or the query can be anonymous if the directory allows it. Confirm with your directory team which of these the domain permits before you start.

Map the attribute in the filter to what your directory actually stores for the login name. Odoo's documented example uses uid, which is the attribute most LDAP directories expect, but Active Directory user objects commonly carry the logon name in attributes such as sAMAccountName. Test this with a single account before you change any other setting. Check the search base against the organizational unit that holds the staff who should sign in, because a base set too high can match accounts that should not have Odoo access, and one set too low will reject valid users.

Be clear about what this integration is. Odoo's documented LDAP support is a password check: Odoo asks the directory whether the username and password are valid. It is not a federated login protocol such as SAML or OpenID Connect, so Odoo does not receive signed assertions or tokens from the identity provider, and it does not inherit directory policies such as multi-factor prompts, conditional access or account lockout rules at the directory level. Odoo's own two-factor authentication still applies to LDAP users if you enable it. If your security review expects federated sign-in, see the sibling topic on SSO with OIDC or SAML, and plan that path before the LDAP build starts. Do not assume any Active Directory feature beyond the LDAP password check unless you have verified it in your own environment.

What you need before configuring LDAP in Odoo

Most LDAP sign-in problems trace back to missing prerequisites rather than to Odoo settings. The six items below cover the edition and plan, the network path, the bind account, the search base, the certificate trust and the test user that the configuration depends on.

A self-hosted Odoo instance on the right plan

Confirm that your Odoo edition and plan include the LDAP option before you plan the work. Odoo's pricing page says only the Custom plan can be hosted on Odoo.sh or on-premise, so a self-hosted install that is not on Custom should be checked with Odoo before the project starts. Record the exact Odoo version, because the Settings screens and the LDAP documentation for that version are the reference your team will follow.

Odoo pricing

A directory server reachable from Odoo

The Odoo application server must open a network connection to the directory on the LDAP port you plan to use. Active Directory domain controllers are the usual directory, and Microsoft's comparison notes that most on-premises apps authenticate against Active Directory with LDAP. Ask the directory team which domain controllers or load-balanced names Odoo should use, and confirm that firewall rules allow the traffic in both directions where the directory needs it.

A bind account with read access

Odoo needs a bind DN and password to search for users, or it can query anonymously if the directory allows it. Use a dedicated service account with read access to the user objects under the search base and no interactive sign-in rights. Confirm who owns its password, how it rotates and where it is stored, because the password sits in Odoo's configuration and changing it later breaks sign-in for every user.

The base DN for user search

The LDAP base tells Odoo where in the directory tree to look for accounts, and the filter such as uid=%s selects the matching entry. In Active Directory the sign-in attribute is often sAMAccountName or userPrincipalName rather than uid, so confirm which attribute your users type and test the filter against a real account. A base that is too high in the tree widens the search and can match unintended objects.

A certificate chain for StartTLS

When StartTLS is enabled, the Odoo server must trust the certificate that the directory presents. Obtain the issuing root and any intermediate certificates from the directory team, install them in the trust store the Odoo host uses, and confirm the certificate name matches the server address you configure. Plain connections send passwords across the network without encryption, so treat a failed certificate check as a blocker rather than a reason to turn TLS off.

A dedicated test user

Create a test account in the directory that matches the group and attributes your real users have, and that is not an administrator. Use it to verify the bind, the filter, the template user behavior on first login and the access it receives in Odoo before any production user signs in. Keep a local Odoo administrator login available so a misconfigured LDAP setting does not lock every administrator out.

Configure LDAP authentication in Odoo step by step

This sequence takes a self-hosted Odoo database from no directory sign-in to a state where directory accounts authenticate, wrong passwords fail, and first-login users receive the groups your template user defines. Each step ends with a check you can repeat before go-live.

  1. Confirm the directory side before touching Odoo

    Your directory team confirms the LDAP server name, port, whether StartTLS is offered, and a dedicated read-only bind account with its distinguished name. Ask them for the base DN that contains your users and the attribute that holds the login name, such as uid in most LDAP schemas or sAMAccountName in Active Directory. Done when you hold these values in writing and have tested the bind account with a directory query tool outside Odoo. Odoo does not create this account, so the directory team owns its password and rotation.

  2. Enable LDAP authentication in Settings

    A user with administrator rights opens Settings in the Odoo database, goes to the Integrations section, and turns on LDAP authentication. This makes the LDAP configuration screen available for the company. Check that the option is saved and that the LDAP configuration entries appear, then confirm in the test database first if you are working on a staging copy rather than production.

  3. Set the server address, port and TLS mode

    Enter the directory server host name and port in the LDAP configuration for the company. Use a host name that matches the certificate presented by the directory, because a mismatch causes TLS failures. If the directory supports StartTLS, enable it so the connection upgrades from plain to encrypted on the same port. Check by running a connection test from the Odoo host: the connection should open and the TLS handshake should complete. If the handshake fails, confirm the certificate chain is trusted by the Odoo server operating system.

  4. Enter the bind account and choose the query mode

    Enter the bind DN and its password so Odoo can search the directory for the user who is signing in. Anonymous query is available, but it is rarely suitable because many directories disable anonymous search, and it removes the audit trail of which service account searched. Use a least-privilege account that can read user entries under the base DN and nothing more. Check that a search for a known test user returns exactly one entry before you proceed.

  5. Set the LDAP base and the user filter

    Set the LDAP base to the distinguished name of the organizational unit that holds the users who should sign in, rather than the whole domain, to limit what can authenticate. Set the filter to uid=%s for an OpenLDAP-style directory, or confirm the equivalent login attribute for Active Directory, such as sAMAccountName=%s, with your directory team. The %s placeholder is replaced with the login name typed at sign-in. Check by signing in with a test account whose login matches the filter, then confirm a login name from a different OU is rejected.

  6. Enable user creation on first login from a template

    Turn on the option that creates a user profile the first time a directory account signs in, and select a template user whose access rights, company assignment and group memberships will be copied to the new profile. Choose a template with the minimum rights your standard user needs, and review it in the Users list before enabling the option. Check by signing in with a non-administrator directory account that has no Odoo profile yet and confirming the profile appears in the Users list.

  7. Test sign-in and review the created user's groups

    Run three checks with a non-administrator test account: a successful sign-in with the correct password, a rejected sign-in with a wrong password, and a sign-in attempt with a valid password for an account outside the filtered base. Then open the newly created user and review its access rights and groups against the template user and your role matrix. Record the results and the template name in your change record, because groups copied from the template are only as narrow as the template itself.

How directory attributes map to Odoo user fields

This table shows which directory value feeds each Odoo user field during LDAP sign-in and what the template user contributes to a new profile. Read each row as a question to answer in your environment before go-live. The main takeaway is that the template user, not the directory, decides what a newly created account can do.

Odoo field or settingSource in the directoryWho decides the valueWhat to confirm
Login nameThe attribute matched by the uid filter, such as uid in a plain LDAP directoryThe filter in the LDAP settingsWhich attribute holds the sign-in name in your directory and that it is unique
NameThe display name attribute supplied by the directoryThe directory record, copied at first loginWhether the name is updated on later sign-ins or only set once
Email addressThe mail attribute supplied by the directoryThe directory record, copied at first loginThat every account has a mail value, since a missing value leaves the profile incomplete
Groups and access rightsNot read from the directory by the basic template setupThe template user the new profile is copied fromWhich groups the template holds and whether any directory group mapping is in use
Company accessNot read from the directory by the basic template setupThe template user and the company set in LDAP configurationWhich companies a new account can reach in a multi-company database
Attribute names in the filter and mappingPlain LDAP uses names such as uid, while Active Directory commonly uses sAMAccountName for sign-inThe directory schema in your environmentExact attribute names with a directory query tool before you set the filter
Template user privilegeNot applicable, the template is an Odoo userThe Odoo administrator who sets the templateThat the template holds the least privilege the organization accepts, since every new account inherits it
Changes after first loginAttribute changes in the directoryOdoo updates the profile on sign-in, but group changes need a manual reviewWhether leavers and role changes are removed in Odoo by a separate process

Choosing the directory server and connection mode

When Odoo runs on your own servers and your users sign in through on-premises Active Directory, Odoo connects to domain controllers on your internal network. The main design question is which domain controllers Odoo talks to and whether that traffic is encrypted. Odoo's LDAP settings accept one server address and port per company, so choose a domain controller that is reachable, healthy and in the same site as the Odoo server where possible. Odoo's documentation describes optional TLS through StartTLS, which upgrades a connection on the standard LDAP port, so a bind password is never sent in clear text.

  • Network path: Allow the Odoo application servers to reach the chosen domain controllers on the LDAP port in use, and confirm any host firewall or segmentation rules permit it.
  • Certificate handling: StartTLS requires the domain controller to present a certificate that Odoo's host trusts. Confirm which internal certificate authority issued it and install that root on the Odoo servers.
  • StartTLS or direct: StartTLS encrypts the session after an initial plain connection and is the usual choice when the server supports it. A direct TLS connection on the LDAPS port avoids the upgrade step, but confirm the directory supports it and that your Odoo version connects to it as expected.
  • Bind account: Use a dedicated, low-privilege service account for the bind DN, not a domain administrator.
  • Mixed estates: FreeIPA's documented cross-forest trust with Active Directory lets Linux resources serve Windows users, but it is a separate configuration from Odoo's LDAP login and does not replace it.

Before you choose a domain controller, ask your directory team which controllers are authoritative for the Odoo base DN and which certificate chain they issue for LDAP.

Hardening the LDAP connection and bind account

A directory login gives Odoo a path to every account it finds, so the connection, the bind account and the template user carry most of the risk. The cards below cover the controls to set before go-live and the checks to run after each change.

Encrypt every directory connection

Use StartTLS on the LDAP connection so the bind password and user credentials are never sent in clear text. Confirm the directory server presents a certificate that Odoo's host trusts, and test with a failed certificate to make sure the login fails rather than falling back to plain LDAP. Ask the directory team whether a plain LDAP port is open to the Odoo server at all, and close it if it is not needed.

Odoo LDAP docs

Scope the bind account read-only

The bind account should have read-only rights and be able to search only the user base that Odoo needs, not the whole directory. Give it no group membership that grants administrative rights, and do not reuse a human administrator account. Test the account by confirming it can find a test user and cannot write to or change any object.

Store the bind password as a secret

Enter the bind password only where Odoo's configuration keeps it protected, and keep it out of configuration files in version control, shell history and tickets. Plan a rotation date and a documented way to update the password in Odoo without an outage. Check that a rotated password works and the old one is rejected.

Limit what the template user grants

Odoo creates a new user on first login from a template user, so every group on that template is granted to every directory user who signs in. Keep the template limited to basic internal access and assign applications and admin roles later. Test one new login and confirm the account carries only the groups the template should give.

Keep a local administrator outside the directory

Keep at least one local Odoo administrator login that does not depend on LDAP, stored with a strong password and two-factor authentication. Use it to recover access if the directory, the bind account or the certificate fails. Test it on a staging copy before go-live so the recovery path is known to work.

Align two-factor and other sign-in methods

Odoo documents two-factor authentication, Google Sign-In, Microsoft Azure OAuth and Facebook sign-in alongside LDAP, so decide which methods each user group may use. Check whether two-factor applies to directory logins, and whether a user can sign in with a second method that bypasses the directory's controls. Document the answer for the security review.

Confirm disabled accounts stop working

A directory account that is disabled or removed must stop working in Odoo, but Odoo's existing session and stored user record may still exist after the directory change. Disable a test account in the directory, then confirm sign-in fails and any active sessions are ended or expire on a known schedule. Record the result and the time it took.

How a login request moves from Odoo to the directory

A sign-in starts in the browser, where the user submits credentials to Odoo inside the Odoo network zone. Odoo then opens a connection to the directory server, upgrades it with StartTLS, and binds with the service account before searching the base DN with the uid filter. Once the user entry is found, Odoo re-binds as that user to verify the password, then creates or updates the local profile from the template user. Check that the directory crossing is the only path that leaves the Odoo zone.

Login path from the browser through Odoo to the directory, with the trust boundary marked.

Where LDAP authentication falls short of SAML or OIDC

Does multi-factor authentication from my identity provider apply when users sign in to Odoo over LDAP?

Not in the way most teams expect. With the LDAP option, Odoo receives the username and password and checks them against the directory itself, so sign-in is not delegated to an identity provider that could enforce multi-factor or conditional access rules. Odoo does offer its own two-factor authentication, which you should configure and test separately. Confirm how the LDAP login flow interacts with Odoo's two-factor settings in the Odoo 19.0 documentation before you rely on either control for compliance evidence.

Why does the Odoo server need direct network access to the directory?

Because every sign-in attempt is a live query from Odoo to the directory server. Odoo must reach the configured server address and port, and if you use StartTLS, the connection must negotiate encryption successfully on that port. Users cannot sign in while the directory is unreachable, and firewall rules between the Odoo network and the domain controllers become part of the availability design. Ask your network team to confirm the path, the ports and the certificate trust before the first test login.

Does LDAP give Odoo a token-based session handoff like OIDC or SAML?

No. LDAP is a directory query protocol, so there is no signed assertion or token that Odoo can exchange with an identity provider for a session. Odoo authenticates the user through its own login flow and manages the session on its side. Teams that need claims, token lifetimes or a central logout from an identity provider should compare this against the OIDC or SAML routes, and confirm in the Odoo 19.0 documentation exactly how sessions end.

How do I remove a former employee's Odoo access when they leave?

Disabling the directory account stops new LDAP sign-ins, but it does not by itself remove the Odoo user profile, its records or its existing sessions. Odoo keeps local user profiles created on first login, so you need a documented offboarding step that deactivates or archives the Odoo user, reviews the user's groups and access rights, and checks for active sessions. Confirm with the Odoo 19.0 documentation how deactivated users are handled at sign-in, and test this with a disposable account.

Can a template user control what new LDAP users are allowed to do in Odoo?

Creating users on first login from a template user lets you copy a baseline profile, so new accounts start with a known set of groups and settings. The template is a starting point, not a continuous policy. Changes to the template do not necessarily update existing users, and access reviews still need to happen in Odoo. Plan who owns the template, how it is reviewed, and which groups it may grant before you enable first-login creation.

Is OIDC or SAML sign-in available for Odoo, and how does it differ?

Odoo's documented sign-in options include LDAP, Google Sign-In, Microsoft Azure OAuth and Facebook sign-in. OIDC and SAML single sign-on for self-hosted Odoo are documented separately through community modules rather than in the core LDAP section. Those routes can delegate authentication to an identity provider, which changes where multi-factor and conditional access are enforced. Confirm which modules and versions apply to your Odoo edition and version, and review the scope of each before choosing a route.

Should I keep LDAP or move to an identity provider with SSO?

Keep LDAP when the directory is the only identity source, users sign in from managed networks, and your controls can be met inside Odoo. Move toward an SSO route when your policies require identity provider enforcement of multi-factor, conditional access or centralized session control. The decision is usually about where the control must live, not only about setup effort. Ask a partner to map each policy to the enforcement point, then confirm current behavior in the Odoo 19.0 documentation before committing.

How LDAP settings interact with Odoo versions and editions

Treat the LDAP configuration as part of the Odoo release it was tested on. Retest sign-in after every major upgrade, because the server address, StartTLS option, bind account, base DN and uid=%s filter are settings your team has verified against one version and must confirm again on the next. The upgrade path itself matters here. Odoo's upgrade service moves a database to a newer supported version through an upgraded test database that should be tested before production, so the LDAP login checks belong in that test run, not after go-live. On Odoo Online and Odoo.sh, major versions are mandatory every two years, so plan the retest as a recurring task, not a one-off project.

Support windows set the deadline for that work. Standard support covers the first three years after a major release on Odoo Online, Odoo.sh and on-premise, and security patches are only provided during standard support. Per the supplied dates, Odoo 19.0 is supported until September 2028 and Odoo 18.0 until September 2027, while Odoo 17.0 standard support has already ended. Confirm the exact version your installation runs in the Apps menu or with the server's version command, then compare it with the Odoo standard and extended support documentation and your own upgrade calendar. Paid extended support is limited to Odoo.sh for select versions and on-premise, so an unsupported self-hosted version may leave the directory login path exposed without patches.

Before changing LDAP settings on production, create a test copy with database duplication and neutralization. Neutralization disables outgoing mail, scheduled actions and similar live integrations in the copy, which keeps a test sign-in from affecting real users or external systems. Point the copy at a staging directory or a test OU, confirm that a first-login user is created from the template user, and check that a disabled directory account is refused. Record the results against the Odoo version and edition in use. Enterprise and Community differ in upgrade access, since the Community edition has no access to the upgrade service, so the upgrade plan for LDAP depends on which edition you run.

Common LDAP login failures and how to fix them

This table pairs each common Odoo LDAP sign-in failure with its likely cause and the first check to run. Read it from the symptom column down, and work through the checks in order before changing directory or Odoo settings. Most failures trace back to the bind account, the base DN and filter, or the trust chain for the StartTLS certificate.

FailureLikely causeFirst check
Bind rejectedWrong bind DN format, expired or mistyped bind password, or a bind account that is locked or lacks read rightsTest the bind DN and password with an LDAP client from the Odoo server, and confirm the account can read the user subtree
No users foundBase DN points at the wrong container, or the filter such as uid=%s does not match the attribute the directory uses for sign-in namesRun an LDAP search with the same base and filter and confirm it returns the expected entry
StartTLS handshake failsThe directory certificate is not trusted by the Odoo host, the certificate name does not match the server address, or the certificate has expiredInspect the certificate chain presented on the LDAP port and confirm the issuing CA is installed on the Odoo server
Connection times outFirewall or network segmentation blocks the LDAP port between the Odoo host and the domain controller, or the wrong port is configuredCheck reachability of the configured port from the Odoo host and review firewall rules on both sides
Users created without expected groupsThe template user lacks the access rights or groups the new accounts should inherit, so first-login accounts start with minimal rightsCompare the template user's group memberships in Odoo with the groups the new users need, then correct the template and test with a fresh account
Disabled directory accounts still sign inOdoo keeps a local user record that stays valid after the directory account is disabled, and the LDAP check does not reject disabled entriesConfirm the disabled account is blocked at the directory level, then deactivate the matching Odoo user and review how existing sessions are ended

What does Odoo LDAP authentication cost and take to set up?

What actually drives the effort of setting up Odoo LDAP authentication?

The effort is driven by how complex the directory is and how many Odoo databases and companies need to trust it. The main inputs are the directory design (one forest or several, where user objects sit, and which attribute identifies a user), the certificate chain used for StartTLS, the number of companies configured in Odoo, the test coverage you agree on, and the Odoo edition and hosting plan. Each company has its own LDAP settings, so a multi-company database multiplies the configuration and testing work. A single-company setup against one domain controller is the smallest case.

Can an experienced Odoo administrator set up LDAP login alone?

A competent Odoo administrator can often configure the settings in Settings under Integrations, but the work is not only Odoo configuration. Someone must confirm the bind account, base DN, uid filter and TLS trust with the directory team, and must test sign-in against real accounts. If the team has no one who understands directory queries, certificates and failure modes, a partner or a directory engineer should review the design. The question to answer honestly is whether someone can test failed binds, disabled accounts and password changes without breaking production logins.

What does the directory team need to provide for the work?

The directory team typically provides a read-only bind account with a documented password policy, the LDAP base for the users who should sign in, confirmation of which attribute holds the login name, and a domain controller or LDAP endpoint that Odoo can reach on the agreed port. They also need to supply or confirm the certificate chain for StartTLS and approve the firewall path from the Odoo server. Ask them who owns the bind account after go-live, how it is rotated, and whether security groups limit which users can authenticate to Odoo.

How should I read a quote against a written scope?

A quote should follow from a written scope, so check that the scope names the Odoo edition and plan, the number of databases and companies, the directory types and servers involved, the certificate work, the template user and user-creation rules, the test cases and the handover. Ask which items are one-time work and which recur, such as support, upgrades and retesting after Odoo major versions. DeployOpen does not publish a price list, so compare quotes on scope items rather than totals. Any item missing from the scope is a likely change request later.

Does the Odoo plan or edition change what LDAP setup costs?

Odoo documents LDAP sign-in as part of its general user features, but the edition and plan decide where you can run the database. According to Odoo's pricing page, only the Custom plan can be hosted on Odoo.sh or on-premise, and only Custom includes multi-company and external API access. Odoo on-premise Enterprise databases are activated with a subscription code. Confirm with Odoo which features your plan includes before you scope the work, since a multi-company design depends on the plan.

Is LDAP enough if we need SAML or OIDC controls for sign-in?

No. LDAP lets Odoo check a username and password against a directory, but it does not give Odoo an identity provider with its own session, multi-factor policy, conditional access or federated sign-in across applications. Odoo's documentation also lists Google Sign-In, Microsoft Azure OAuth and two-factor authentication as separate options. When your security policy requires controls at the identity provider, plan SAML or OIDC single sign-on instead, and treat LDAP as a directory lookup. Using both needs a clear rule for which accounts can sign in by which method.

What ongoing work should we expect after LDAP goes live?

Plan for recurring work after go-live. Each Odoo upgrade needs LDAP settings and user creation rules checked on the upgraded test database before production. Password changes, disabled accounts and changes to the bind account must be tested, and the directory team should review the bind account rotation. Odoo standard support covers the first three years after a major release, and Odoo SaaS versions are released every two to three months, so the planned upgrade path affects how often this check repeats. Ask whether the scope includes this retesting or whether it is a retainer.

How DeployOpen scopes and delivers Odoo directory sign-in

DeployOpen plans, configures and documents Odoo sign-in against your directory inside infrastructure you control, starting with a written scope that names the directory, the Odoo edition and the user-creation rules. Each step is tested against your own accounts before handover, so your identity and security teams can review the result.

How we scope

  • Confirm the Odoo edition, version and hosting type, since LDAP sign-in depends on what your self-hosted install supports.
  • Map which directory (Active Directory or LDAP) holds the accounts, which OUs or groups may sign in, and who owns the bind account.
  • Agree in writing whether users are created on first login from a template user, and which Odoo groups that template grants.
  • Record the StartTLS requirement, the base DN, the uid filter and the fallback admin login that stays available during any outage.

How we build

  • Configure the LDAP server address, port and StartTLS settings in Odoo's Integrations settings for each company that needs them.
  • Create a read-only bind account in the directory with only the rights needed to search for sign-in users.
  • Test the uid filter with a pilot group of accounts, including disabled, locked and out-of-scope users, before wider enablement.
  • Verify the template user's access rights and record rules so first-login accounts receive only the permissions intended.

How we hand over

  • Deliver a written configuration record listing server settings, bind account ownership, base DN, filter and template user.
  • Document the test results, including which accounts were accepted, rejected and created on first login.
  • Provide a runbook for password changes, bind account rotation, directory outages and removing leavers from Odoo.
  • Walk your identity and security teams through the limits of LDAP compared with SAML or OIDC SSO before go-live.

How we support

  • Offer ongoing support, Odoo upgrade alignment and periodic re-testing of directory sign-in as a retainer.
  • Retest sign-in after Odoo version upgrades, directory schema changes and changes to the bind account or TLS certificates.
  • Review the access granted to template-created users at each access review and after organizational changes.
  • Confirm with your directory team the supported Active Directory and TLS settings for your environment before scoping work.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.