How to govern AI agent access to Microsoft 365 data
In short
AI agents reach Microsoft 365 data through a user's own permissions, a Copilot Studio connection, a Microsoft Graph app registration or an MCP server. Govern each path the same way: grant the narrowest scopes, read-only where possible, prefer delegated permissions, route consent through admins, give every agent a sponsor, and watch the logs so you can revoke fast.
Every AI assistant that reads Microsoft 365 data uses an identity and a set of permissions. The useful question isn't whether an AI tool is safe. It's which identity it uses, what it can reach, who approved it, and how fast you can turn it off.
How do AI assistants and agents get access to Microsoft 365 data?
AI assistants and agents reach Microsoft 365 data through four paths: Microsoft 365 Copilot, Copilot Studio agents, third-party apps on Microsoft Graph and MCP servers. Each path ends in an identity with permissions in Microsoft Entra ID, and the path decides which controls apply.
| Access path | Whose access it uses | Where you control it |
|---|---|---|
| Microsoft 365 Copilot | The signed-in user's permissions | SharePoint permissions; Integrated apps in the Microsoft 365 admin center |
| Microsoft Copilot Studio agents | The end user's credentials, or the maker's if chosen | Power Platform admin center and the agent's Microsoft Entra Agent ID |
| Third-party AI apps on Microsoft Graph | Permissions granted through consent | Enterprise applications in Microsoft Entra ID |
| MCP servers and tools | Whatever credential the server holds or the user grants | The client, the server's app registration, Conditional Access |
Microsoft states that Copilot only surfaces organizational data to which individual users have at least view permissions, so its risk is oversharing, and the fix lives in SharePoint.
Model Context Protocol (MCP) is an open standard that lets an AI assistant call tools a server exposes. If an MCP server signs each user in with Entra ID, consent and the user's Conditional Access policies apply. If the AI client uses an API key instead, that request bypasses Entra ID entirely, and the server reads Microsoft 365 with its own stored credential. Scope that credential's grants.
What does least privilege mean for an AI agent?
Least privilege means an agent reads only what its job needs, changes nothing it doesn't have to, and reaches specific sites or mailboxes, not the whole tenant. Microsoft's best practices for Entra Agent ID agree and recommend reviewing permissions regularly.
- Read before write. Grant
ReadWriteorMail.Sendonly when the job is to change or send something. - Narrow the resource, not just the verb. Microsoft Graph Selected scopes such as
Sites.SelectedandFiles.SelectedOperations.Selectedgive no access on consent alone. An admin must also grant the app a role on each site, list or file. By contrast, the application permissionFiles.Read.Allreads every file in the tenant. - Scope mailbox access. Application permissions to mail, calendars and contacts reach every mailbox by default. Role-based access control (RBAC) for Applications in Exchange Online limits a role such as
Application Mail.Readto a management scope (a filter that picks mailboxes, such as one department) or an administrative unit. Then remove the unscoped grant in Entra ID, because the two add up and the broad one wins. - Make access expire. For agents in Microsoft Entra Agent ID, access packages (bundles of access in Microsoft Entra ID Governance) can grant access that ends on a set date, and the agent's sponsor is notified before it expires (agent access packages). This needs Microsoft 365 E7, or Microsoft Agent 365 with at least Microsoft Entra ID P1 or Microsoft 365 E3.
Should an agent use delegated or application permissions?
Use delegated permissions whenever a person is present, because the agent can never exceed what that person can reach. Use application permissions only for agents that must run unattended, and scope them (permissions and consent overview).
| Aspect | Delegated permissions | Application permissions |
|---|---|---|
| Acts as | The signed-in user, with the app or agent as the caller | The app or agent itself, with no user |
| Reach | Only what both the scope and the user allow | Everything the permission covers, tenant-wide unless scoped |
| Who can consent | Users for their own data (if your settings allow), admins for everyone | Admins only |
| Conditional Access evaluates | The user's policies | Agent identity policies (Agent 365), or workload identity policies for single-tenant apps (Workload ID Premium); not third-party multitenant apps |
| Main risk | Content the user can already see but shouldn't | One credential that can read every mailbox or site |
One trap: a Copilot Studio tool set to maker-provided credentials looks delegated but runs with the maker's access. To require end-user credentials, open the environment or environment group in the Power Platform admin center (Manage > Environments or Environment groups). Select Settings > Product > Features, and under Control maker credential options select only End-user credentials (control maker-provided credentials). Check scheduled and background agents first: they fail once every tool call needs a signed-in user.
How should admin consent work for AI tools?
Restrict user consent, route requests through the admin consent workflow, and review each request before anyone approves it.
- Restrict user consent. Under Entra ID > Enterprise apps > Consent and permissions > User consent settings, choose Do not allow user consent, or allow it only for apps from verified publishers or your own tenant, for permissions you classify as low impact (configure user consent). Sprawlsight's free snapshot checks this setting as ENTRA-030 "Users can't consent to applications on their own". The new-tenant default, Let Microsoft manage your consent settings, still lets users consent to many delegated permissions. Existing grants stay until you remove them.
- Turn on the admin consent workflow. Under Admin consent settings, let users request apps and name reviewers. Reviewers can approve only what their own role allows: Cloud Application Administrator or Application Administrator covers most requests, but only a Global Administrator can approve requests for Microsoft Graph application permissions.
- Review the request, not the brand. Read every permission, note whether it's delegated or application, and ask why the app needs it. Publisher verification confirms the publisher's organization is real, but it doesn't speak to security practices, so treat it as one input.
What are agent identities, and why do they matter?
An agent identity is a special type of service principal (the object that represents an app in your tenant), built for AI agents as part of Microsoft Entra Agent ID. Each one is created from a template called an agent identity blueprint and holds no credentials of its own. It also needs a sponsor: the person or group accountable for the agent (agent identities overview).
They make agents something you can list, own, police and switch off. As of October 2026:
- You can see them under Entra ID > Agents > Agent identities, with owners, sponsors, permissions and sign-in logs (manage agent identities).
- Copilot Studio uses them. New Copilot Studio agents get one automatically, with the agent owner as sponsor. Agents created before May 2026 keep app registrations until Microsoft migrates them (Copilot Studio agent identities).
- Sponsors keep someone accountable. If a sponsor leaves, sponsorship moves to their manager. Sprawlsight's free snapshot checks that each agent has one as AGT-001 "Every agent identity has a sponsor".
- Conditional Access can target them: all agents, selected agents, one blueprint's agents, or agents tagged with custom security attributes (Conditional Access for agents). Agents can't complete MFA, so build agent-specific policies and test them in report-only mode. It needs the same Agent 365 licensing, and for now Microsoft enforces it on Copilot Studio agents only in Microsoft Teams.
For agents nobody owns, read agent sprawl. Microsoft's Zero Trust Assessment also checks agents for sponsors and Conditional Access coverage.
How do you limit which tools an agent can use?
Turn on only the tools each agent needs, and let data policies decide which connectors are allowed.
- In Copilot Studio, every tool on an MCP server starts enabled under an Allow all toggle. Turn it off and enable only what the job needs, so tools added later stay off (add tools from an MCP server).
- Data policies still apply. Power Platform data policies sort connectors into business, non-business and blocked groups, and they also govern MCP servers in Copilot Studio, which connect through connectors.
- Choose actions, not whole connectors. For first-party and certified connectors, adding specific actions, not the whole connector, limits the agent's Entra Agent ID scopes to those operations when you publish. Custom connectors, MCP servers and REST API tools add no scopes, so review those in Copilot Studio.
- Elsewhere, approve each server and its tool list, and prefer servers that sign users in with Entra ID.
How do you monitor and revoke an agent's access?
Monitor agents in Microsoft Entra sign-in logs, Microsoft Entra audit logs and Microsoft Purview Audit. To revoke access, stop new tokens first, then remove every permission grant.
- Sign-in logs. Under Entra ID > Monitoring & health > Sign-in logs, apps using application permissions appear in service principal sign-ins, delegated apps in user (often non-interactive) sign-ins, and agents can be filtered by agent type (agent sign-in logs).
- Entra audit logs. Send them to Log Analytics or Microsoft Sentinel and alert on new consent grants, permission changes, role assignments and credentials added to apps or blueprints.
- Microsoft Purview Audit. Copilot and agent interactions are recorded with references to the files, sites and emails used (audit logs for Copilot and AI applications). Non-Microsoft AI apps need pay-as-you-go auditing turned on.
Revoke in this order:
- Stop new tokens. Under Entra ID > Enterprise apps > All applications, open the app, select Properties and set Enabled for users to sign-in? to No (disable user sign-in). For an agent identity, disable the agent or its blueprint. Tokens already issued stay valid until they expire.
- Remove the grants. A disabled app keeps its permissions, so re-enabling it restores them all. Revoke admin-consented permissions on the app's Permissions page. User-consented grants need Microsoft Graph or PowerShell. Also remove SharePoint Selected permissions and Exchange RBAC for Applications role assignments.
This script stops new tokens and removes the Entra ID grants for one app:
Connect-MgGraph -Scopes "Application.ReadWrite.All","DelegatedPermissionGrant.ReadWrite.All","AppRoleAssignment.ReadWrite.All"
$sp = Get-MgServicePrincipal -Filter "appId eq '<app-id>'"
Update-MgServicePrincipal -ServicePrincipalId $sp.Id -AccountEnabled:$false
Get-MgOauth2PermissionGrant -Filter "clientId eq '$($sp.Id)'" -All |
ForEach-Object { Remove-MgOauth2PermissionGrant -OAuth2PermissionGrantId $_.Id }
Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $sp.Id -All |
ForEach-Object { Remove-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $sp.Id -AppRoleAssignmentId $_.Id }
What should you ask before approving a new AI tool?
Ask the vendor how the tool authenticates and what it stores, and ask the business owner what job it does and who sponsors it.
Ask the vendor:
- Which identity does the tool use: delegated permissions, application permissions, an agent identity or an API key?
- Which exact permissions does it request, and what breaks without each? Can it work with
Sites.Selectedor a scoped set of mailboxes? - What data does it store, where, for how long, and which models process it?
- How do we revoke it, and what happens to stored data when we do?
Ask the business owner:
- What job does the agent do, and which data does that job need?
- Who is the sponsor, and who is the technical owner?
- Does it need to run without a user present? If not, approve delegated permissions only.
- When will you review it again?
Use the answers as the baseline for your next Microsoft 365 permissions audit. Sprawlsight measures app consent, standing admin rights and nested groups as Permission Sprawl, and the permission sprawl field guide has the clean-up playbook.
Frequently asked questions
Does Microsoft 365 Copilot get its own access to my data?
No. Microsoft 365 Copilot works with the signed-in user's permissions and only surfaces organizational data that person can at least view. If Copilot shows someone a file they shouldn't see, the file is overshared, so fix the site or the sharing link rather than the AI. Agents you add to Copilot are different: a Copilot Studio agent can use maker-provided credentials, so check how each agent's tools authenticate.
What is Sites.Selected in Microsoft Graph?
Sites.Selected is a Microsoft Graph permission that limits an app to the SharePoint sites it's explicitly granted. Consenting to it gives no access on its own: someone must also assign the app a read, write, owner or full control role on each site. Related scopes apply the same model to lists, list items and files.
Can Conditional Access block an AI agent?
Yes, for agents that sign in with a Microsoft Entra agent identity, if you have Microsoft Agent 365 licensing. Policies can target all agents, selected agents, one blueprint's agents or agents tagged with custom security attributes, but Microsoft currently enforces them on Copilot Studio agents only in Microsoft Teams. When an agent acts for a user, the user's policies apply instead, and an agent that uses an API key never reaches Conditional Access. Apps registered in your own tenant can also be blocked with Conditional Access for workload identities (Workload ID Premium), but third-party multitenant apps can't.
Who should approve consent requests for AI apps?
Name a small group of reviewers in the admin consent workflow, usually the identity or security team. Reviewers can approve only what their own role allows: Cloud Application Administrator or Application Administrator covers most requests, but only a Global Administrator can approve requests for Microsoft Graph application permissions. Being named a reviewer doesn't grant any extra privileges.
What's the fastest way to cut off an AI app's access?
Disable sign-in for its enterprise application, which stops Microsoft Entra ID from issuing new tokens to it. Then revoke its delegated and application permissions, because a disabled app keeps its grants and gets them all back if someone re-enables it. For an agent identity, disable the agent or its blueprint.