This document specifies the Active Directory schema extension for first-class Agent identity principals. Agents are AI/LLM systems that require authentication and authorization within enterprise environments.
This spec uses the msDS- prefix for Windows AD deployments. For Samba4/Linux deployments, the equivalent schema uses x-agent-, x-tool-, x-policy-, x-sandbox-, and x-gpo- prefixes. The mapping is:
| Windows AD (this doc) | Samba4 (samba4/docs/SCHEMA.md) |
Notes |
|---|---|---|
msDS-Agent |
x-agent |
Auxiliary class on user objects |
msDS-AgentSandbox |
x-agentSandbox |
Auxiliary class on computer objects |
msDS-AgentTool |
x-agentTool |
Structural class |
msDS-AgentPolicy |
x-agentPolicy |
Structural class |
| N/A | x-agentInstructionGPO |
Samba4-only, GPO-style instructions |
msDS-AgentType |
x-agent-Type |
Attribute naming pattern |
The semantic model is identical — only the OID prefix and attribute naming differ. See samba4/docs/SCHEMA.md for the Samba4 mapping and schema/ vs samba4/schema/ for the respective LDIF files.
- First-class Identity: Agents are peers to Users and Service Accounts, not second-class citizens
- Native Authentication: Full Kerberos, NTLM, and certificate support
- Granular Authorization: Fine-grained control over agent capabilities and tool access
- Comprehensive Auditing: Complete audit trail of all agent activities
- Hierarchical Trust: Support for agent-to-agent delegation and parent-child relationships
- Backward Compatibility: Legacy systems see agents as user accounts and sandboxes as computer accounts
top top
│ │
person person
│ │
organizationalPerson organizationalPerson
│ │
user user
│ │
msDS-Agent computer
(identity) │
msDS-AgentSandbox
(execution)
Two inheritance chains:
- Agent (identity): top -> person -> organizationalPerson -> user -> msDS-Agent
- Sandbox (execution): top -> person -> organizationalPerson -> user -> computer -> msDS-AgentSandbox
Agents inherit from user for identity, while sandboxes inherit from computer for execution environment. This mirrors how Active Directory already works: users log into computers; agents run in sandboxes.
| Concern | Object | Inherits From | sAMAccountName | UAC |
|---|---|---|---|---|
| Identity | msDS-Agent | user | No $ suffix (e.g. claude-assistant-01) |
0x0200 NORMAL_ACCOUNT |
| Execution | msDS-AgentSandbox | computer | With $ suffix (e.g. sbx-prod-001$) |
0x1000 WORKSTATION_TRUST_ACCOUNT |
Following the gMSA (Group Managed Service Account) pattern provides:
| Feature | Benefit |
|---|---|
| unicodePwd attribute | Password-based authentication |
| servicePrincipalName | Kerberos authentication |
| msDS-ManagedPasswordInterval | Automatic credential rotation |
| objectSid | Security principal identity |
| sAMAccountName | Legacy authentication |
| altSecurityIdentities | Certificate mapping |
| userAccountControl | Account state management |
| Property | Value |
|---|---|
| Common Name | msDS-Agent |
| LDAP Display Name | msDS-Agent |
| OID | 1.3.6.1.4.1.{PEN}.1.1 |
| Object Class Category | 1 (Structural) |
| Subclass Of | user |
| Default Security Descriptor | Inherited from user |
| System Only | FALSE |
All mandatory attributes are inherited from the user class:
- cn
- objectCategory
- objectClass
- sAMAccountName
In addition to inherited attributes, the following agent-specific attributes are available:
| Attribute | Description |
|---|---|
| msDS-AgentType | Agent classification |
| msDS-AgentCapabilities | Registered capabilities |
| msDS-AgentOwner | Responsible identity DN |
| msDS-AgentParent | Parent agent DN |
| msDS-AgentTrustLevel | Trust tier (0-4) |
| msDS-AgentRuntimeEndpoint | Deprecated - use msDS-SandboxEndpoint on sandbox object |
| msDS-AgentModel | AI model identifier |
| msDS-AgentSandbox | Assigned sandbox DNs |
| msDS-AgentPolicies | Applied policy DNs |
| msDS-AgentDelegationScope | Delegation permissions |
| msDS-AgentAuditLevel | Audit verbosity |
| msDS-AgentAuthorizedTools | Authorized tool DNs |
| msDS-AgentDeniedTools | Denied tool DNs |
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.1 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
Valid Values:
autonomous- Self-directed agents with independent goalsassistant- Interactive agents working with humanstool- Specialized single-purpose agentsorchestrator- Agents that coordinate other agents
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.2 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Multi-valued |
| Indexed | TRUE |
Format: URN-style capability identifiers
urn:agent:capability:code-execution
urn:agent:capability:file-access
urn:agent:capability:network-access
urn:agent:capability:user-interaction
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.3 |
| Syntax | 2.5.5.1 (DN) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
| Link ID | Forward link (generate pair) |
Links to the user or group responsible for the agent.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.4 |
| Syntax | 2.5.5.1 (DN) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
Links to a parent agent for hierarchical agent relationships.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.5 |
| Syntax | 2.5.5.9 (Integer) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
| Range | 0-4 |
Trust Level Definitions:
| Level | Name | Capabilities |
|---|---|---|
| 0 | Untrusted | Read-only, no network, no delegation |
| 1 | Basic | Limited read/write, no delegation |
| 2 | Standard | Normal operations, constrained delegation |
| 3 | Elevated | Broad access, protocol transition |
| 4 | System | Full trust, equivalent to service account |
Deprecated: This attribute is replaced by
msDS-SandboxEndpointon themsDS-AgentSandboxobject. Existing values should be migrated to the corresponding sandbox object.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.6 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | FALSE |
Format: URI pointing to agent runtime
https://agent-runtime.corp.contoso.com:8443/agents/claude-01
grpc://localhost:50051
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.7 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
Examples:
claude-opus-4-5gpt-4-turbogemini-ultracustom-fine-tuned-v1
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.8 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Multi-valued |
| Indexed | FALSE |
References to policy objects or policy identifiers applied to the agent.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.9 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Multi-valued |
| Indexed | FALSE |
Defines what resources the agent can access on behalf of users. Format is service-principal-based:
cifs/fileserver.corp.contoso.com
http/webapp.corp.contoso.com
MSSQLSvc/sqlserver.corp.contoso.com:1433
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.10 |
| Syntax | 2.5.5.9 (Integer) |
| Single/Multi | Single-valued |
| Indexed | FALSE |
| Range | 0-3 |
Audit Levels:
| Level | Description |
|---|---|
| 0 | Minimal - Errors only |
| 1 | Standard - Authentication and authorization events |
| 2 | Detailed - All operations |
| 3 | Debug - Full trace including internal operations |
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.11 |
| Syntax | 2.5.5.1 (DN) |
| Single/Multi | Multi-valued |
| Indexed | TRUE |
| Link ID | Forward link |
Links to msDS-AgentTool objects the agent is authorized to use.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.12 |
| Syntax | 2.5.5.1 (DN) |
| Single/Multi | Multi-valued |
| Indexed | TRUE |
| Link ID | Forward link |
Links to msDS-AgentTool objects explicitly denied to the agent (overrides group grants).
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.13 |
| Syntax | 2.5.5.1 (DN) |
| Single/Multi | Multi-valued |
| Indexed | TRUE |
Links to msDS-AgentSandbox objects the agent is assigned to run in. An agent may be assigned to multiple sandboxes (e.g. a production sandbox and a development sandbox).
| Property | Value |
|---|---|
| Common Name | msDS-AgentSandbox |
| LDAP Display Name | msDS-AgentSandbox |
| OID | 1.3.6.1.4.1.{PEN}.1.3 |
| Object Class Category | 1 (Structural) |
| Subclass Of | computer |
| Default Security Descriptor | Inherited from computer |
| System Only | FALSE |
All mandatory attributes are inherited from the computer class:
- cn
- objectCategory
- objectClass
- sAMAccountName
In addition to inherited attributes, the following sandbox-specific attributes are available:
| Attribute | Description |
|---|---|
| msDS-SandboxEndpoint | Runtime endpoint URI for the sandbox |
| msDS-SandboxAgents | Agent DNs authorized to run in this sandbox |
| msDS-SandboxResourcePolicy | Resource limits and quotas (CPU, memory, storage) |
| msDS-SandboxNetworkPolicy | Network access rules and firewall policies |
| msDS-SandboxSecurityProfile | Security profile name (e.g. restricted, standard, privileged) |
| msDS-SandboxStatus | Current sandbox status (e.g. provisioning, ready, suspended, decommissioned) |
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.30 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | FALSE |
URI pointing to the sandbox runtime environment.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.31 |
| Syntax | 2.5.5.1 (DN) |
| Single/Multi | Multi-valued |
| Indexed | TRUE |
Back-link to msDS-Agent objects authorized to execute in this sandbox.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.32 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | FALSE |
JSON or structured string defining resource limits (CPU, memory, storage quotas).
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.33 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | FALSE |
Network access rules and firewall policies applied to the sandbox.
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.34 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
Named security profile applied to the sandbox (e.g. restricted, standard, privileged).
| Property | Value |
|---|---|
| OID | 1.3.6.1.4.1.{PEN}.2.35 |
| Syntax | 2.5.5.12 (Unicode String) |
| Single/Multi | Single-valued |
| Indexed | TRUE |
Current operational status of the sandbox: provisioning, ready, suspended, decommissioned.
Agents authenticate using Kerberos via Service Principal Names (SPNs).
SPN Format:
AGENT/<hostname>@REALM
AGENT/<hostname>.<domain>@REALM
Example:
AGENT/claude-01@CORP.CONTOSO.COM
AGENT/claude-01.corp.contoso.com@CORP.CONTOSO.COM
Agents can authenticate using NTLM via the inherited unicodePwd attribute from the User class.
Agents support certificate-based authentication via the altSecurityIdentities attribute.
Mapping Format:
X509:<I>DC=com,DC=contoso,DC=corp,CN=IssuingCA<S>CN=claude-01,OU=Agents,DC=corp,DC=contoso,DC=com
Like gMSAs, agents can use managed passwords with automatic rotation:
# Configure managed password
Set-ADAgent -Identity "claude-01" -ManagedPasswordIntervalInDays 30Agents support Kerberos constrained delegation for acting on behalf of users.
Configuration:
Set-ADAgent -Identity "claude-01" `
-TrustedForDelegation $false `
-TrustedToAuthForDelegation $true `
-PrincipalsAllowedToDelegateToAccount @("user1", "user2")RBCD is configured on the sandbox (computer) object, not the agent (user) object. This ensures delegation is scoped to the execution environment:
$sandbox = Get-ADAgentSandbox -Identity "sandbox-prod-001"
Set-ADComputer -Identity $sandbox.DistinguishedName -PrincipalsAllowedToDelegateToAccount @($serviceAccount)Agents must be explicitly authorized to use specific tools. See TOOL-CATALOG.md for details.
DC=corp,DC=contoso,DC=com
└── CN=System
├── CN=Agents
│ ├── CN=claude-assistant-01
│ └── CN=orchestrator-main
├── CN=Agent Sandboxes
│ ├── CN=sandbox-prod-001
│ └── CN=sandbox-dev-001
└── CN=Agent Tools
├── CN=microsoft.powershell
└── CN=microsoft.word
The CN=Agent Sandboxes container holds msDS-AgentSandbox (computer-derived) objects. Each sandbox represents an isolated execution environment that one or more agents can be assigned to run in.
Default userAccountControl flags for agents (user-derived):
| Flag | Value | Description |
|---|---|---|
| ACCOUNTDISABLE | 0x0002 | Initially disabled until configured |
| NORMAL_ACCOUNT | 0x0200 | Standard user account type |
| DONT_EXPIRE_PASSWORD | 0x10000 | For managed credentials |
| TRUSTED_FOR_DELEGATION | 0x80000 | Only for Trust Level 4 |
Default userAccountControl flags for sandboxes (computer-derived):
| Flag | Value | Description |
|---|---|---|
| WORKSTATION_TRUST_ACCOUNT | 0x1000 | Computer account type |
| DONT_EXPIRE_PASSWORD | 0x10000 | For managed credentials |
Agents with Trust Level 3+ should NOT be added to Protected Users group as this would disable delegation.
High-trust agents may be protected by AdminSDHolder depending on delegation configuration.
Agents (user objects):
- Maximum 20 characters, no
$suffix - Format:
{name} - Example:
claude-assistant-01,orchestrator-main
Sandboxes (computer objects):
- Maximum 15 characters +
$suffix - Format:
sbx-{name}$ - Example:
sbx-prod-001$,sbx-dev-001$
CN=claude-assistant-01,CN=Agents,CN=System,DC=corp,DC=contoso,DC=com
claude-assistant-01@corp.contoso.com
AGENT/claude-assistant-01
AGENT/claude-assistant-01.corp.contoso.com
HOST/claude-assistant-01 (for NTLM fallback)
The following agent attributes are recommended for the Global Catalog:
- msDS-AgentType
- msDS-AgentOwner
- msDS-AgentTrustLevel
- msDS-AgentModel
Agent credential changes replicate with urgent priority (like user password changes).
- Schema Admin group membership
- Enterprise Admin group membership (for container creation)
- Connectivity to Schema Master DC
- IANA Private Enterprise Number for production OIDs
- Agent attributes (01-agent-attributes.ldif) 1b. Sandbox attributes (01b-sandbox-attributes.ldif)
- Tool attributes (02-tool-attributes.ldif)
- Agent class (03-agent-class.ldif) 3b. Sandbox class (03b-sandbox-class.ldif)
- Tool class (04-tool-class.ldif)
- Containers (05-containers.ldif)
- Default tools (06-default-tools.ldif)
- Agent activities logged to tamper-evident audit trail
- Owner accountability for all agent actions
- Segregation of duties via Trust Levels
- Agent access to personal data tracked via audit events
- Data access scope defined in msDS-AgentDelegationScope
- Owner responsible for agent's data processing activities
- Healthcare agents require Trust Level 3+ for PHI access
- All PHI access logged at Audit Level 2+
- Break-glass procedures documented for emergency access
- Document existing service account usage
- Create corresponding agent with same permissions
- Update SPN registrations
- Migrate keytabs/passwords
- Add tool authorizations
- Update delegation settings
- Disable old service account
- Create agent with matching password interval
- Configure same delegation settings
- Add tool authorizations based on service usage
- Update application configurations
- Monitor during transition period
- Disable old gMSA