2020-11-15 21:42:02 +00:00
---
title: Active Directory
---
2020-10-18 21:03:46 +00:00
2022-06-15 19:31:34 +00:00
< span class = "badge badge--secondary" > Support level: Community< / span >
2020-10-18 21:03:46 +00:00
## Preparation
The following placeholders will be used:
2022-05-09 19:22:41 +00:00
- `ad.company` is the Name of the Active Directory domain.
- `authentik.company` is the FQDN of the authentik install.
2020-10-18 21:03:46 +00:00
2021-11-01 14:56:24 +00:00
## Active Directory setup
2020-10-18 21:03:46 +00:00
1. Open Active Directory Users and Computers
2. Create a user in Active Directory, matching your naming scheme

2021-04-15 15:33:25 +00:00
3. Give the User a password, generated using for example `pwgen 64 1` or `openssl rand -base64 36` .
2020-10-18 21:03:46 +00:00
2021-04-09 09:23:24 +00:00
4. Open the Delegation of Control Wizard by right-clicking the domain and selecting "All Tasks".
2020-10-18 21:03:46 +00:00
2020-12-05 21:08:42 +00:00
5. Select the authentik service user you've just created.
2020-10-18 21:03:46 +00:00
6. Ensure the "Reset user password and force password change at next logon" Option is checked.

2022-05-09 19:22:41 +00:00
7. Grant these additional permissions (only required when _Sync users' password_ is enabled, and dependent on your AD Domain)
2021-04-09 09:23:24 +00:00

2020-10-18 21:03:46 +00:00
2022-01-31 11:11:01 +00:00
Additional info: https://support.microfocus.com/kb/doc.php?id=7023371
2021-04-09 09:23:24 +00:00
## authentik Setup
2021-11-01 14:56:24 +00:00
2022-01-31 11:11:01 +00:00
In authentik, create a new LDAP Source in Directory -> Federation & Social login.
2020-10-18 21:03:46 +00:00
Use these settings:
2022-05-09 19:22:41 +00:00
- Server URI: `ldap://ad.company`
2020-10-18 21:03:46 +00:00
2022-01-31 11:11:01 +00:00
For authentik to be able to write passwords back to Active Directory, make sure to use `ldaps://` . You can test to verify LDAPS is working using `ldp.exe` .
2020-10-18 21:03:46 +00:00
2021-12-02 19:15:11 +00:00
You can specify multiple servers by separating URIs with a comma, like `ldap://dc1.ad.company,ldap://dc2.ad.company` .
When using a DNS entry with multiple Records, authentik will select a random entry when first connecting.
2022-05-09 19:22:41 +00:00
- Bind CN: `<name of your service user>@ad.company`
- Bind Password: The password you've given the user above
- Base DN: The base DN which you want authentik to sync
- Property mappings: Control/Command-select all Mappings which start with "authentik default LDAP" and "authentik default Active Directory"
- Group property mappings: Select "authentik default LDAP Mapping: Name"
2020-10-18 21:03:46 +00:00
2022-01-31 11:11:01 +00:00
Additional settings that might need to be adjusted based on the setup of your domain:
2020-10-18 21:03:46 +00:00
2022-05-09 19:22:41 +00:00
- Group: If enabled, all synchronized groups will be given this group as a parent.
- Addition User/Group DN: Additional DN which is _prepended_ to your Base DN configured above to limit the scope of synchronization for Users and Groups
- User object filter: Which objects should be considered users. For Active Directory set it to `(&(objectClass=user)(!(objectClass=computer)))` to exclude Computer accounts.
- Group object filter: Which objects should be considered groups.
- Group membership field: Which user field saves the group membership
- Object uniqueness field: A user field which contains a unique Identifier
2020-10-18 21:03:46 +00:00
2022-01-31 11:11:01 +00:00
After you save the source, a synchronization will start in the background. When its done, you can see the summary under Dashboards -> System Tasks.
2020-10-18 21:03:46 +00:00
2021-04-09 09:23:24 +00:00

2020-12-25 22:38:19 +00:00
To finalise the Active Directory setup, you need to enable the backend "authentik LDAP" in the Password Stage.
2021-04-09 09:23:24 +00:00
