SharePoint Online: Monitor External Sharing Invitations with Alerts

Requirement: Monitor SharePoint Online and OneDrive external sharing invitations.

SharePoint Online: Configure External Sharing Alert
When external sharing is enabled, users share files stored in SharePoint or OneDrive for Business site securely with team members, colleagues, external vendors or partners. You can audit the external user invitations in SharePoint Online and OneDrive for Business by using the Set-SPOTenant cmdlet with "BccExternalSharingInvitations" parameter to "$True" and providing a list of email addresses to "BccExternalSharingInvitationsList". By default, this configuration is set to False - meaning BCC for external sharing is disabled. You can turn it ON and configure E-mail address to receive notification when external sharing invitations are sent.
$TenantAdminURL = ""

#Connect to Admin Center
Connect-SPOService -Url $TenantAdminURL -Credential (Get-Credential)

#enable alert for external user invitation
Set-SPOTenant -BccExternalSharingInvitations $True -BccExternalSharingInvitationsList "[email protected]"
external user invitation monitor in sharepoint online and Onedrive

This will blind-copy (BCC) the e-mail messages to the E-mail IDs listed in the BccExternalSharingsInvitationList parameter. You can specify either a single email address or multiple addresses by creating a comma separated list with no spaces.
Set-SPOTenant -BccExternalSharingInvitations $True -BccExternalSharingInvitationsList "[email protected],[email protected]"
As a result, a copy of every external user invitation will be sent to the specified E-mails and remain available for later auditing or review. This can be a PowerShell way of Monitoring External Sharing Invitations if needed.

Disable BCC External Sharing Invitations
To disable the BCC external sharing invitations, just set the flag to False.
Set-SPOTenant -BccExternalSharingInvitations $False

Check Existing Settings using Get-SPOTenant cmdlet
You can check the existing setting for tenant using:
Get-SPOTenant | Select BccExternalSharingInvitations, BccExternalSharingInvitationsList

Monitor External User Sharing using Compliance Center Alerts
External sharing report is a common requirement in organizations. We can either search Audit logs and get a list of all of externally shared resources or create a alert policy to get E-mail notification as and when it happens. To monitor external content sharing using Microsoft 365 compliance center,
  • Navigate to compliance center alert policies at
  • Click on New alert policy >> Provide name and other parameters.
  • Choose the activity as "Shared File Externally" and create the policy.

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.