Chapter 5 of 6
Implement#
1. Select the agent and configure Agent Registry#
Choose one published agent from Foundry, Copilot Studio, or Agent Builder. In Microsoft 365 admin center, open Agents > All agents > Registry. Confirm that its registry ID and status match the contract. Set the agent origin, registry ID, Agent 365 instance ID, test group, host product, consent decision, validation aliases, and DLP pre-change values in agent-deployment.json. Confirm that the group has no installation before DLP is enabled.
Update coverage-handoff.md if an owner or product boundary differs from its recorded assignment.
For a hosted or custom agent, the application developer confirms the supported Python or .NET Agent 365 SDK path before installation. Validate that agent ID, tenant ID, conversation ID, inference calls, tool calls, and exceptions reach the approved telemetry destination. Keep tokens and interaction payloads out of the repository.
2. Preflight the DLP change#
Set the values from the approved tenant and registry entry:
PowerShell
$approvedTenantId = $env:MICROSOFT365_TENANT_ID
$agentInstanceId = $env:AGENT365_INSTANCE_ID
.\scripts\preflight.ps1 `
-Phase Dlp `
-ApprovedTenantId $approvedTenantId `
-AgentInstanceId $agentInstanceId
Bash
approved_tenant_id="${MICROSOFT365_TENANT_ID:?Set MICROSOFT365_TENANT_ID.}"
agent_instance_id="${AGENT365_INSTANCE_ID:?Set AGENT365_INSTANCE_ID.}"
./scripts/preflight.sh \
--phase dlp \
--approved-tenant-id "$approved_tenant_id" \
--agent-instance-id "$agent_instance_id"
The portal has no read-only deployment preview. Use the policy summary and TestWithNotifications simulation as the safety check. The DLP preflight does not authorize installation.
3. Configure, simulate, and enable the DLP policy#
Create a custom Purview DLP policy from the approved change. Enter the recorded agent, group, label, directions, locations, action, notification route, incident route, output-label control, and restore path. Start in TestWithNotifications.
Inspect the policy summary and simulation. It must contain the selected agent, group, label, directions, and locations only. Enable it through the approved change and wait for the recorded propagation allowance. Keep the policy in simulation or restore it if the inspected scope differs.
4. Authorize and install the scoped rollout#
After the delivery owner observes the propagation allowance, update the DLP gate values in the field reference. Run the installation-phase preflight:
PowerShell
.\scripts\preflight.ps1 `
-Phase Install `
-ApprovedTenantId $approvedTenantId `
-AgentInstanceId $agentInstanceId
Bash
./scripts/preflight.sh \
--phase install \
--approved-tenant-id "$approved_tenant_id" \
--agent-instance-id "$agent_instance_id"
Open the recorded registry entry and install the agent for its named test group and one host product. Use the recorded consent. Do not select an organization-wide deployment.
5. Check included and excluded access#
The included member must find the agent in the recorded host product. The excluded user must not. Remove the scoped installation and stop if either result differs. Use the labelled synthetic source for the DLP interaction.
For a Foundry agent, the Foundry platform owner confirms the separate app-scoped rule and user-context processContent enforcement path. For Copilot Studio and Agent Builder, keep native runtime controls with the source-platform owner.
6. Query current Agent 365 activity#
For PowerShell, connect Exchange Online and Security & Compliance PowerShell to the approved tenant. For Bash, sign in to Azure CLI as the approved Microsoft Graph application.
PowerShell
.\scripts\query-agent-activity.ps1 -AgentInstanceId $agentInstanceId
Bash
./scripts/query-agent-activity.sh --agent-instance-id "$agent_instance_id"
The scripts filter current Agent 365 operations to one instance and display creation time, operation, agent ID, agent name, and result status. They do not write an audit export.