> For the complete documentation index, see [llms.txt](https://docs.securepass.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.securepass.me/documentation/admin-user-guide/ways-to-onboard-a-user/importing-users/importing-from-active-directory.md).

# Importing from Active directory

## 4.1 Open the AD import wizard

On **Manage Users**, click **Import** and select **AD**.

![The Import menu open, showing AD, OpenLDAP, Azure AD and Import from Excel.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/SKbceFRTXfv6r1vhhsrK/assets/rId45.png)

The **Configure Active Directory** wizard opens. It has three steps, listed down the left: **Setup Connection**, **Import Containers** and **Map Attributes**.

## 4.2 Step 1 — Set up the connection

In **LDAP Configuration**, open the dropdown and choose **New Connection**. If you have connected to this directory before, select the saved connection instead and skip to step 2.

![The LDAP Configuration dropdown with New Connection selected.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/EIuMUZA9fR7JO6OvHrnU/assets/rId49.png)

Fill in the connection details.

![The Setup Connection step of the Configure Active Directory wizard.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/ax9JH3tMmf5tldUtnrIz/assets/rId52.png)

**Data Sync Frequency** governs how often SECUREpass re-reads this directory after the first import. The screen shows the schedule it will use — for **Daily**, *Sync runs every day at 2:00 AM*. Choose **Manual** if you want to control every sync yourself. Scheduled syncs appear under **Schedulers**.

Click **Test Connection**.

![The completed connection form with the Test Connection button.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/C22cgQ9A2r3X6sFWoS4X/assets/rId55.png)

## 4.3 Step 2 — Select the containers to import

A green **Test Connection Success** message confirms the directory is reachable, and the wizard moves to **Import Containers** showing the directory tree.

![The Import Containers step, showing the directory tree with a Test Connection Success confirmation.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/GhH4fcTWnYrSt0DljWG8/assets/rId59.png)

Select the checkbox against each container you want to import from. Containers are shown with their real DNs — `CN=Users`, `OU=Domain Controllers`, `OU=securepass` and so on — and nested containers are indented beneath their parent.

![Containers selected for import.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/MBgld1XUDwloftp1f2FP/assets/rId62.png)

Click **Continue**.

## 4.4 Step 3 — Map attributes

Attribute mapping tells SECUREpass which directory field feeds each SECUREpass field. The left column, **IAM Attribute**, is fixed. For each one, pick the matching **Directory Attribute**.

![The Map Attributes step, with SECUREpass IAM attributes on the left and directory attributes to be selected on the right.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/cId1arY4Yz6MSDhsTrgD/assets/rId66.png)

{% hint style="warning" %}
Map **Username** and **Email ID** at minimum. These are how SECUREpass identifies a user and how it sends them notifications. An unmapped attribute imports empty and shows as a dash on **Manage Users**.
{% endhint %}

### Adding a custom attribute mapping

If your directory holds a field SECUREpass has no equivalent for, add it under **Custom Attribute Mapping (optional)**. The section reads *No custom attributes defined* until you add one.

{% stepper %}
{% step %}

#### Click **+ Add**

{% endstep %}

{% step %}

#### Enter the **IAM Attribute** name you want to create

{% endstep %}

{% step %}

#### Select the **Directory Attribute** it maps to

{% endstep %}
{% endstepper %}

![Adding a custom attribute mapping.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/y8DsOaStu2jK4IegTR5Y/assets/rId69.png)

![The custom attribute row, pairing an IAM attribute with a directory attribute.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/mm8F6qzOJvaSQmOrfDaQ/assets/rId72.png)

Custom attributes are visible afterwards through the `{}` action on the user’s row.

When mapping is complete, click **Import**.

![The Import button at the foot of the Map Attributes step.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/Nby9FxWxP3ioPwLiC2t0/assets/rId75.png)

## 4.5 Step 4 — Select the users to onboard and save

SECUREpass fetches every user in the selected containers and lists them for you to choose from. **Nothing has been saved yet.**

![The fetched user list, with the AD source icon in the Source column.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/CLWqk5mnZWj2kbTNpwdG/assets/rId80.png)

{% stepper %}
{% step %}

## Select users

Select the checkbox against each user you want in SECUREpass, or use the header checkbox to take the whole page.
{% endstep %}

{% step %}

## Save users

Click **Save**.
{% endstep %}
{% endstepper %}

![Selecting users from the fetched list.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/vN0zw7yrIflFZWmTbvh4/assets/rId83.png)

The selected users are written to SECUREpass and appear on **Manage Users**, with **Source** set to AD and **Status** set to **INACTIVE**.

![The saved users on the Manage Users page.](https://content.gitbook.com/content/W2srIAMN6RKFwvuEorV5/blobs/cmIJ8GAAxjVyTEXTs8kP/assets/rId86.png)

{% hint style="warning" %}
Users are not usable yet. They have no applications, no roles and no authentication modes, and their status is **INACTIVE**. Activate them and grant access before telling them they can sign in.
{% endhint %}
