What Gets Discovered
Resources
Every computer object in Active Directory is imported as a Windows Server PAM Resource. For each machine, Discovery resolves the DNS hostname to an IP address and captures:- Computer name and DNS hostname
- Operating system and version
- Object GUID
Accounts
Discovery imports two categories of accounts: Domain Accounts — User objects from Active Directory, associated with the AD Server resource. Each account includes:- Username and User Principal Name (UPN)
- Account type (User or Service) — detected by the presence of Service Principal Names (SPNs) or naming conventions like
svc-* - AD GUID, last logon time, and password last set date
- Username and SID
- Enabled/disabled status
- Last logon time and password last set date
Dependencies
For each Windows machine reachable via WinRM, Discovery enumerates:| Dependency Type | What’s Captured |
|---|---|
| Windows Services | Service name, display name, state, start mode, path, and the account it runs as |
| Scheduled Tasks | Task name, path, logon type, run level, triggers, actions, last/next run time, and the account it runs as |
| IIS App Pools | Pool name, runtime version, pipeline mode, auto-start setting, identity type, and the account it runs as |
DOMAIN\user, user@domain.com, UPN, and local account names.
Prerequisites
- Infisical Gateway — Deployed in your network with access to the domain controller and Windows machines
- LDAP access — The domain controller must be reachable on the LDAP port (default: 389)
- AD credentials — A domain account with read access to query computer and user objects via LDAP
- WinRM access (optional, for dependency scanning) — Target Windows machines should have WinRM enabled on port 5985
Setup
Ensure Gateway is Running
Deploy an Infisical Gateway in your network with connectivity to your domain controller (LDAP port) and Windows machines (WinRM port 5985).
Create a Discovery Source
- Navigate to your PAM project and go to the Discovery tab
- Click Add Discovery Source and select Active Directory
- Fill in the configuration:
A friendly name for this discovery source (e.g.,
corp-ad-discovery)Select the Gateway that has network access to your domain controller and Windows machines
The fully-qualified domain name (e.g.,
corp.example.com)The hostname or IP address of the domain controller (e.g.,
10.0.1.10)The LDAP port (default:
389)An Active Directory account with read access to query the directory
The password for the AD account
How often to run discovery automatically:
- Manual — Only runs when triggered
- Daily — Runs once per day
- Weekly — Runs once per week
Scan Phases
Each discovery scan executes two phases sequentially:Phase 1: AD Enumeration
Connects to the domain controller via LDAP through the Gateway and:- Queries all computer objects — creates or updates a Windows Server PAM Resource for each
- Queries all user objects — creates or updates PAM Accounts, classifying each as a User or Service account
- Marks resources and accounts not found in this scan as Stale
Phase 2: Dependency Scan
For each discovered Windows machine, connects via WinRM through the Gateway and:- Runs PowerShell commands to enumerate Windows Services, Scheduled Tasks, and IIS App Pools
- Discovers local user accounts on each machine
- Resolves each dependency’s run-as account to link it to the correct PAM Account
- Reports per-machine errors for machines that are unreachable or don’t have WinRM enabled
Reviewing Results
After a scan completes, review the results from the discovery source detail page:- Runs tab — Shows scan history with status, duration, and counts of discovered/new/stale items. Expand a run to see per-phase progress and any machine-level errors.
- Resources tab — Lists all discovered Windows servers with OS version, dependency count, and stale/active status. Click a resource to navigate to its detail page.
- Accounts tab — Lists all discovered accounts with their resource, account type, dependency count, last logon, and stale/active status. Click an account to navigate to its detail page.
Viewing Dependencies
From an account’s detail page, select the Dependencies tab to see all services, tasks, and app pools that run under that account’s credentials. Each dependency shows:- Name and type (Service, Task, or App Pool)
- The resource (machine) it runs on
- Current state (e.g., Running, Stopped)
- Whether it’s enabled for credential rotation
Enabling Dependencies for Rotation
Dependencies are discovered with rotation disabled by default. To include a dependency in credential rotation:- Navigate to the account’s Dependencies tab
- Click the menu on a dependency and select Enable
The enabled/disabled state of a dependency is never overwritten by subsequent discovery scans. Your configuration is always preserved.