- What changed: Connector write actions reached general availability in Copilot Chat and Cowork. Users can approve an individual tool action once, or let Copilot remember the approvalβso agents now change data in connected systems instead of only reading it.
- Why admins care: A write-capable connector is only as safe as the OAuth consents behind it. Tenant-wide (
AllPrincipals) delegated grants such asSites.FullControl.All,Directory.ReadWrite.All, andMail.Sendare the real blast radius. - Purview side: Insider Risk Management now supports alert classifications (True Positive, Benign/Operational, False Positive) with mandatory reasons, and Purview adds AI-generated, human-readable intents for custom Sensitive Information Types.
For the first generation of Microsoft 365 Copilot, most connector risk was about oversharing: Copilot could read what a user could read. With connector write actions generally available in Copilot Chat and Cowork, the question changes to what can an agent change on a user's behalf, and who consented to that?
This runbook shows how to inventory write-capable delegated consents in your tenant with Microsoft Graph PowerShell, then ties the findings to the Purview controls that were announced alongside the feature. The Graph audit was run against our LAB 365 dev tenant (xzf58.onmicrosoft.com); the Purview items are configuration guidance from Microsoft's documentation and were not exercised in the lab.
Architecture: Where Write Actions Create Risk
Step 1: Audit Tenant-Wide Write-Scoped Delegated Consents
An oauth2PermissionGrant with consentType = AllPrincipals applies to every user in the tenant. Filter those grants for write-capable scopes (.ReadWrite, .FullControl, .Send, .Create, *.Submit):
Connect-MgGraph `
-ClientId "c841ae33-4093-4385-8a90-6a530761f9b9" `
-TenantId "ab85c7a1-366d-44ba-acc6-924fa0950045" `
-CertificateThumbprint "BEAC429DE404B46FF030811C0C9DE00DE701C027" `
-NoWelcome
$WritePattern = 'ReadWrite|FullControl|\.Send|\.Create|\.Submit|\.Manage'
$Grants = (Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/oauth2PermissionGrants?`$top=200").value |
Where-Object { $_.consentType -eq 'AllPrincipals' }
$Report = foreach ($Grant in $Grants) {
$WriteScopes = ($Grant.scope -split ' ') | Where-Object { $_ -match $WritePattern }
if ($WriteScopes) {
$Sp = Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/servicePrincipals/$($Grant.clientId)?`$select=displayName,appId"
[PSCustomObject]@{
Application = $Sp.displayName
AppId = $Sp.appId
WriteScopes = $WriteScopes -join ', '
}
}
}
$Report | Sort-Object Application | Format-Table -AutoSize -Wrap
What the LAB 365 Dev Tenant Returned
The lab tenant holds 24 delegated grants. Among the tenant-wide ones, these write-capable scopes stood out:
Scope(s) granted tenant-wide Risk
---------------------------------------------------------------------- -----------------------------
Sites.FullControl.All, ExternalConnection.ReadWrite.All Full control of every site collection
Files.ReadWrite.All, TermStore.ReadWrite.All, Sites.ReadWrite.All Bulk file and taxonomy changes
Directory.ReadWrite.All, Organization.ReadWrite.All, User.ReadWrite Directory-wide changes
Directory.Read.All, Mail.Send, Sites.FullControl.All, Sites.Read.All Send mail as any signed-in user
Mail.ReadWrite.Shared Edit any shared mailbox the user can reach
Lab note: This is a development tenant with many first-party and test applications, so the volume is expected. In production, every row in this report should map to an owner, a business justification, and a review date.
Step 2: Remediate Over-Broad Consents
- Replace tenant-wide with per-user consent where the app genuinely needs write access only for a small group. Remove the
AllPrincipalsgrant and let individual users consent under your user-consent policy. - Prefer resource-specific permissions such as
Sites.SelectedoverSites.FullControl.All. - Require admin consent workflow so new write-scoped requests are reviewed before they become tenant-wide.
# Remove a specific over-broad tenant-wide grant after review
# Remove-MgOauth2PermissionGrant -OAuth2PermissionGrantId "<grant-id>"
Step 3: Purview Controls to Pair with Write Actions
These items come from Microsoft's Ignite 2026 announcements and documentation; confirm availability and licensing in your tenant before relying on them:
- DLP for Microsoft 365 Copilot and Cowork: Block external web search when prompts contain sensitive information, block responses to sensitive prompts, and stop processing of labeled files and emails. The policy location supports Entra administrative units.
- Insider Risk Management alert classification: Classify each alert as True Positive, Benign/Operational, or False Positive, and record a reason. Use the reasons to tune policy thresholds for agent activity.
- Custom Sensitive Information Types: Purview Information Protection can generate a human-readable semantic intent for a custom SIT, helping reviewers see what a classifier is meant to catch and reduce false positives.
References & Official Microsoft Documentation
- Microsoft Learn β Microsoft Purview Data Security and Compliance Protections for AI
- Microsoft Learn β Data Loss Prevention for Microsoft 365 Copilot
- Microsoft Learn β oAuth2PermissionGrant Resource Type (Microsoft Graph v1.0)
- Microsoft Learn β Manage App Consent Policies in Microsoft Entra ID
- Microsoft Learn β Insider Risk Management Alerts
π¬ Reader Comments & Feedback
Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.
Leave a Comment or Report an Update