Before protecting documents, determine which identity the AI agent uses. An agent may operate through:
This distinction matters. An agent using a developer’s account may inherit that person’s permissions, while a dedicated application identity can be restricted independently.
For SharePoint AI agents, Microsoft Graph’s Sites.Selected permission provides an important least-privilege control. It allows administrators to grant an application access to specific SharePoint sites rather than the entire tenant.
Sites.Selected requires two steps:
If either step is missed, the agent may fail—or gain broader access through another identity path.
If you cannot identify the agent at the gate, you cannot reliably control what it accesses.
Access to a SharePoint site does not mean an agent should be able to read every document within it.
Microsoft Purview sensitivity labels can classify and protect individual files. For example:
A label alone provides classification, not enforcement. To function as a true security control, it must apply protection such as encryption, authorized identities, or appropriate usage rights.
Microsoft Purview Data Loss Prevention (DLP) adds another layer. It can detect sensitive or labeled content, restrict actions, display policy notifications, and generate security incidents.
The gate limits where an agent can go. The door protects sensitive information after it arrives.
An agent responding, “I can’t access that file,” does not prove that a security policy worked.
The failure could result from:
Microsoft Purview Audit, Activity Explorer, Entra logs, and DLP incident reports can reveal which identity attempted access and which control responded.
Enable auditing before testing AI-agent security. Without audit evidence, an access failure is only an observation—not proof that protection was enforced.
A practical test compares two agents:
Ask both agents the same questions about an agent-readable document and an agent-restricted document.
Then review the audit records to identify which identity each agent used and whether the restriction was genuinely enforced.
This step is especially important because a knowledge connector may use an access path different from the agent identity shown in Copilot Studio.
Securing enterprise AI agents requires more than adding a permission or creating a DLP policy. A complete model needs all three layers:
When these controls work together, organizations can adopt AI agents without giving them unrestricted access to enterprise information.
Before trusting an AI agent with your data, verify its identity, restrict its access, protect the content, and audit the outcome.