# Active Directory Least Privilege

### Overview

When creating a PAM Directory Resource, it is recommended that you use a service account with the least required privileges to perform rotation.&#x20;

The following steps show you how to enable a service account to rotate credentials using Active Directory's Delegation of Control feature.&#x20;

{% hint style="info" %}
Before starting, create a service account for password rotation whose credentials you will store in the Keeper resource record.
{% endhint %}

### Procedure

1. Launch Active Directory Users and Computers
2. In the directory tree, select a node for which password rotation should be allowed.
3. Right-click on the node, then click Delegate Control.
4. In the Delegation of Control Wizard, click 'Add'.
5. Locate your chosen service account, then click 'OK'.

<figure><img src="/files/wQGVj9rHOTtkxgUWnOko" alt=""><figcaption><p>Selecting a service account to perform rotation</p></figcaption></figure>

6. Click 'Next' to advance to permission selection.
7. In 'Delegate the following common tasks', check the option for 'Reset user passwords and force password change at next logon', then click 'Next'.

<figure><img src="/files/g5Hjd3x2NAbov1YOZ9Ee" alt=""><figcaption><p>Delegating permission to reset user passwords</p></figcaption></figure>

8. Add the service account's login and password to the Resource Record for the AD instance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/en/keeperpam/privileged-access-manager/references/active-directory-least-privilege.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
