Guide: Securing Microsoft 365 Copilot from Anonymous and Cross-Tenant Access

As the Copilot settings are ever evolving, I just wanted to add an updated best practice on securing M365 Copilot, as the settings have changed a few times this year.

Microsoft 365 Copilot is integrated with your organization’s data and Microsoft productivity suite. Securing it against anonymous access and unwanted cross-tenant connections is essential to protect sensitive information, maintain compliance, and prevent data breaches.

Key Principles

  • Zero Trust: Never trust, always verify every connection—even inside your organization.
  • Least Privileged Access: Only provide users the minimal level of access required.
  • Tenant Isolation: Ensure organizational boundaries are strongly enforced.

1. Block Anonymous Access

Best Practices

2. Enforce Tenant Restrictions

Microsoft Entra (Azure AD) Tenant Restrictions enable you to restrict users to only access resources in your own tenant.

3. Audit and Monitor for Anonymous Access

  • Microsoft 365 provides several built-in tools and reports to help you identify, audit, and monitor files shared via anonymous links (also called “anyone links”) and files or folders shared externally from SharePoint or OneDrive.
  • 1. Using Microsoft Purview Audit (Unified Audit Log) https://learn.microsoft.com/en-us/purview/audit-log-activities
  • Access the Microsoft Purview compliance portal.
  • Navigate to Audit.
  • Set your desired date and time range.
  • In the Activities filter, search for and select actions like:
    • AnonymousLinkCreated
    • AnonymousLinkRemoved
    • AnonymousLinkUsed (when an anonymous link is used/accessed)
    • SharingInvitationCreated (when a file/folder is shared externally)
  • Export and review the log to identify when anonymous links were created, accessed, or removed, and which files or folders were affected.
  • Note: The audit log will show IP addresses for anonymous link usage, but not user identities since links are unauthenticated. Retention of logs is linked to your organization’s licensing level, so keep retention settings in mind.
  • 2. Generating External Sharing Reports per Site https://learn.microsoft.com/en-us/sharepoint/sharing-reports
  • You can generate a CSV report for any SharePoint site or OneDrive to see exactly what has been shared externally:
  • Go to the site in SharePoint or the corresponding OneDrive.
  • Settings > Site usage.
  • Scroll to Shared with external users and select Run report.
  • Choose where to save the CSV file and run the report.
  • For OneDrive, go to Settings > More settings > Run sharing report.
  • These reports give detailed records of what items have been shared externally, with whom, and what permissions were granted.
  • 3. SharePoint or OneDrive Admin Center Reports
  • In the SharePoint Admin Center, go to Reports > Sharing.
  • Review all externally shared files, who shared them, when, and the method (direct user, specific guest, anyone link).
  • Filter or export results for further analysis.
  • 4. PowerShell for Deep Auditing
  • Custom PowerShell scripts can enumerate all anonymous links, their permissions, and other metadata for both SharePoint and OneDrive. Examples of relevant PowerShell commands and scripts:
  • Use Search-UnifiedAuditLog to query for AnonymousLinkCreated or SharingInvitationCreated events.
  • Scripts are available online to export all anonymous or external links across your tenant into CSV files, including permission level, date, file path, and expiration if set. https://o365reports.com/2021/06/22/audit-anonymous-access-in-sharepoint-online-using-powershell/
  • Set up automatic alerts for unusual sharing or guest activity.

Example Configuration Checklist

AreaActionWhere to Configure
Sharing LinksTurn off “Anyone” links, restrict to authenticated usersMicrosoft 365, SharePoint, OneDrive
Tenant RestrictionsEnable and enforce via proxy or supported devicesEdge Device/Proxy, Entra ID
Guest AccessRestrict guest access to own directory objects onlyEntra ID Admin Center
Conditional AccessRequire MFA, block risk, enforce device complianceEntra ID > Conditional Access
Power Platform/AppsDisable anonymous access everywhere possiblePower Platform Admin Center

For Purview setting on Information protection labels , I will be doing some follow up blogs to help ensure your data stays safe.

Hope that helps answer some of the M365 Security questions I have been asked over this last 6 weeks.

Leave a comment