> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oleria.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Active Directory

> Set up a service account and the Oleria AD agent to discover Active Directory users and, optionally, Windows security events.

Connect Active Directory (AD) to Oleria to see who has access across your on-premises and hybrid AD environment. Oleria reads directory data through a lightweight agent you install on a domain-joined machine, using a service account. The account only needs read access unless you use [remediation actions](#remediation-actions).

## What Oleria discovers

* **Users and service accounts** - AD user and `inetOrgPerson` objects, including accounts that hold admin rights through group membership.
* **Groups** - security and distribution groups, with direct and nested membership.
* **Computers** - computer objects and the groups and organizational units they belong to.
* **Organizational units and group policies** - your OU structure, group policy objects, and the domain.
* **Activity** - Windows security events, when you configure event forwarding.

## Prerequisites

* Admin access on the Oleria platform to add a new integration.
* A domain-joined Windows server (ADDJ machine) to install the Oleria AD agent on.
* Administrator permissions on that machine.
* Permission in Active Directory to create a user and delegate permissions to it: read permissions for discovery, and the permissions in [Remediation actions](#remediation-actions) if you use them.

## Agent host requirements

The Oleria AD agent runs on the domain-joined Windows server you choose. Make sure that server meets these requirements:

| Requirement | Details |
| :- | :- |
| Operating system | Windows Server 2016 or later (2016, 2019, 2022, or 2025). |
| CPU and memory (recommended) | At least 2 CPUs and 8 GB of RAM. |
| Installation rights | Local administrator, to run the installer from an elevated PowerShell session. The agent then runs as a Windows service. |
| Outbound HTTPS (port 443) | Your Oleria API endpoint (`api.<your-tenant>.oleria.io`), Oleria authentication (`auth.prod.oleria.io`), and Amazon S3 regional endpoints (`*.s3.<region>.amazonaws.com`, for example `*.s3.us-west-2.amazonaws.com`), which the agent uses to download the installer and upgrades and to upload data. Contact us for the regions your tenant uses. Oleria never connects in to the agent from the internet. |
| Connection to Active Directory | A domain controller on port `389` (`ldap://`) or `636` (`ldaps://`), matching the **DomainUrl** you enter during installation. |
| Activity (optional) | The agent reads events from the server's **Forwarded Events** log, so this server must be the Windows Event Forwarding collector. Allow inbound WinRM from your domain controllers on port `5985` (HTTP) or `5986` (HTTPS). |

> [!NOTE]
>
> If you need to route the agent's outbound traffic through a proxy, contact us at [support@oleria.com](mailto:support@oleria.com) before you install.

## Create a service account in Active Directory

Create a dedicated service account for Oleria. Use a service account, not an employee account, so the integration keeps working if someone leaves. For discovery, the account needs read access to user, group, computer, organizational unit (OU), and Group Policy Object (GPO) objects, which a standard domain user has by default. To use [remediation actions](#remediation-actions), it also needs write access to the **member** attribute of the groups it manages, and permission to create, delete, and manage user accounts.

**1. Create a new user**

Sign in to Active Directory and create a new user, for example, **Oleria Read Admin**.

![Active Directory Users and Computers New Object - User dialog for the Oleria Read Admin account](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-1.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=c99b3930b61736ddf4f457f352eb3e9d)

**2. Delegate control**

Open your AD Domain and select **Delegate Control**.

![Active Directory domain context menu with Delegate Control](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-2.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=e6bbcba7fe50706fb5b4473e632c3473)

On the **Users or Groups** page, select **Add**, add the service account you created, and select **Next**.

![Delegation of Control Wizard with the Oleria service account selected](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-3.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=70779c8e7df5615aef7629fb99ac31d7)

On the **Tasks to Delegate** page, choose **Delegate the following common tasks** and grant the following read permissions:

* Read all user information
* Read all inetOrgPerson information

  ![Read all inetOrgPerson information](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-4.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=d31f7bb511aa0c0457ec3a1c59ff952d)

To use [remediation actions](#remediation-actions), also select these tasks on the same page:

* Create, delete, and manage user accounts, for **Create user**, **Disable user accounts**, and **Enable user accounts**
* Modify the membership of a group, for **Add user to group** and **Remove user from group**

Delegated on your domain, **Create, delete, and manage user accounts** also lets the service account reset the password of any user except protected accounts such as domain admins. Select it only if you'll use these actions.

**3. Verify group membership**

The account will be automatically added to the Domain Users group. Open the Domain Users group to verify the service account.

![Active Directory Domain Users group with service account listed as member](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-5.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=53e0bd7acbf6bcf1a999f53a8a2fb319)

## Configure event forwarding

Event forwarding is how Oleria gets activity for Active Directory. It forwards Windows security events from your domain controllers, so Oleria can show sign-in and account activity alongside the accounts it discovers. Without event forwarding, Oleria still discovers user accounts but shows no activity.

To set it up, follow Microsoft's guide to [configure Windows event forwarding](https://learn.microsoft.com/en-us/defender-for-identity/deploy/configure-event-forwarding).

## Connect Active Directory to Oleria

**1. Open the integration**

Sign in to your Oleria workspace and select **Workspace** -> **Integrations** -> **Active Directory**.

**2. Name your agent**

In **Agent Name**, enter a name for your agent and select **Continue**. The name can contain only letters, numbers, hyphens (`-`), and underscores (`_`).

![Oleria agent setup panel with the agent name field and Continue button](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-7.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=c8fb5fa9f532415841cbfbf19edc9cc6)

**3. Copy the installation script**

Oleria shows a PowerShell installation script. Copy it. You'll run it on the domain-joined server where you want to install the Oleria AD agent.

![Oleria workspace showing PowerShell installation script with copy button](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-8.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=d5a100563f997aa4ab7cccffc6204bfc)

## Install the Oleria AD agent

**1. Run the installation script**

Sign in to the ADDJ machine, open PowerShell as an administrator, and run the script you copied in the previous section.

![PowerShell terminal running Oleria AD Agent installation script](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-9.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=087900162af6d483eda515564fd88529)

**2. Accept the license terms**

The Oleria AD agent installer opens. Accept the license terms and select **Next**.

![Accept the license terms and select Next](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-10.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=3cf298578e6ba16ba92ff417cb65ab84)

**3. Provide the service account details**

On the next page, provide the following:

* **Username** - the name of the service account you created
* **Password** - the service account's password
* **DomainName** - your domain in distinguished name format (for example, if your domain is `example.local`, enter `dc=example,dc=local`)
* **DomainUrl** - the LDAP URL of your domain controller, including the scheme. For example, `ldap://10.0.0.5` or `ldap://dc01.example.local:389`. Use `ldaps://` with port `636` if your domain controller requires LDAPS.

Select **Next** and follow the prompts to complete the installation.

![Oleria AD agent installer wizard with the Next button](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-11.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=c69e7462107e75d6afe1fc7d9ce75f80)

**4. Confirm installation**

When the installation completes, the **OleriaADConnectAgent** service appears in the Windows services list.

![Windows Services panel showing OleriaADConnectAgent service running](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-12.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=936c9e5ada2e75cf6872b1f16c1cea49)

## Verify the integration

In your Oleria workspace, go to **Integrations** -> **Connected** -> **Active Directory** and select **View Details**. The side panel shows the health status of the Oleria AD agent.

![Oleria Connected Integrations panel showing Active Directory agent health status](https://mintcdn.com/oleria/JQNzbB9a7dBTORxV/images/integrations/active-directory/step-13.png?fit=max\&auto=format\&n=JQNzbB9a7dBTORxV\&q=85\&s=91e135d6800de7583b4eb124d1963e90)

## Remediation actions

Oleria can take the following actions in Active Directory. The Oleria AD agent runs each action with the service account.

| Action | What it does | Revert |
| :- | :- | :- |
| Add user to group | Adds the user to the group's **member** attribute. | Removes the user from the group. |
| Remove user from group | Removes the user from the group's **member** attribute. | Adds the user back to the group. |
| Create user | Creates a user named `CN=<username>` directly under the **DomainName** you entered when you installed the agent. Oleria sets the username as the `sAMAccountName`, which Active Directory limits to 20 characters, and sets the first name, last name, display name, user principal name, and email when you provide them. It sets the password you enter, or one it generates, and the user must change it at next sign-in. The account is disabled unless you choose to activate it. | Deletes the user the action created. |
| Disable user accounts | Turns on **Account is disabled** for the user (the `ACCOUNTDISABLE` flag in `userAccountControl`). | Enables the account again. If the account was already disabled before the action ran, it stays disabled. |
| Enable user accounts | Turns off **Account is disabled** for the user (clears the `ACCOUNTDISABLE` flag in `userAccountControl`). | Disables the account again. If the account was already enabled before the action ran, it stays enabled. |

> [!NOTE]
>
> The read-only permissions from the setup steps above aren't enough for these actions. Grant the service account:
>
> * Write permission on the **member** attribute of the groups you want Oleria to change, for **Add user to group** and **Remove user from group**.
> * **Create, delete, and manage user accounts** on your domain, delegated with the **Delegation of Control Wizard**, for **Create user**, **Disable user accounts**, **Enable user accounts**, and their reverts.

* **Create user** and **Disable user accounts** need the latest Oleria AD agent. With an older agent, **Create user** fails, and **Disable user accounts** doesn't protect the service account. Its revert also can't tell whether the account was already disabled, so it might enable an account that was disabled before, or fail. **Enable user accounts** also needs the latest agent. With an older agent, its revert can't tell whether the account was already enabled, so it might disable an account that was enabled before, or fail. You can see the agent's **Version** under **Agent Health** in **View Details**. Contact us at [support@oleria.com](mailto:support@oleria.com) to upgrade the agent before you use these actions.
* **Create user** also needs an encrypted connection to your domain controller, because Active Directory only accepts a password over one. With an `ldap://` **DomainUrl**, the agent uses StartTLS. With `ldaps://`, it uses LDAPS, and **DomainUrl** must use the domain controller's hostname. Either way, the domain controller needs a TLS certificate for its hostname that the agent's server trusts. Other actions and discovery don't need it.
* If a password breaks your domain's password policy, **Create user** fails and Oleria deletes the new user. If that cleanup also fails, the action's error says so, and you need to delete the user in Active Directory. If a user with the same name already exists, the action fails and changes nothing.
* **Create user** doesn't add the new user to groups. Use **Add user to group** after it runs.
* Oleria won't disable the service account the agent uses, because the agent could then no longer connect to Active Directory.
* Accounts that belong, or used to belong, to protected groups such as Domain Admins don't inherit delegated permissions (Active Directory resets their permissions from `AdminSDHolder`). Oleria can't disable these accounts, or change protected groups, unless you grant the service account permissions on `AdminSDHolder` too. Most organizations handle these accounts manually instead.

## Contact us

For questions about this integration, contact us at [support@oleria.com](mailto:support@oleria.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.