--- title: "Local Active Directory setup instructions" slug: "dex-local-active-directory" updated: 2026-11-30T12:32:29Z published: 2026-11-30T12:32:29Z canonical: "documentation.sysaid.com/dex-local-active-directory" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.sysaid.com/llms.txt > Use this file to discover all available pages before exploring further. # Local Active Directory setup instructions IDENTITY & DIRECTORY Domain service account (LDAP) To connect Dex to on-premises Active Directory you do not use a cloud API token: you provide a dedicated domain service account and network access to a domain controller (usually via a Dex connector running inside the network). ## Steps 1. In Active Directory Users and Computers, create a dedicated service account (e.g. svc-dex) with a strong, non-expiring password. Do not add it to Domain Admins. 2. Delegate least-privilege rights on the target OUs: read access to user/group objects, plus write to specific attributes only if Dex must make changes (e.g. unlock accounts, group membership). 3. Note the AD domain DNS name (e.g. corp.contoso.com) and the hostname/IP of a reachable domain controller. 4. Ensure LDAP/LDAPS connectivity (TCP 389 / 636) from wherever the Dex connector runs to the domain controller. 5. Provide Dex the service account username (UPN or DOMAIN\sAMAccountName), its password, the domain, and the domain-controller host. ## Paste into Dex The connection form in the Dex app store asks for these values: - AD domain (FQDN) - Domain controller host / LDAP URL - Service account username e.g. DOMAIN\svc-dex or svc-dex@corp.contoso.com - Service account password - Base DN / search OU  Optional: scopes the directory tree Dex reads.