Teams Chats - default Sharing Links to 'People Currently in this Chat
Have you ever wondered how to default the default sharing link in Teams chats to ‘People currently in this chat’? By default, if “Anyone” is disabled within the tenant, the sharing link is set to “People in my organization”. This can be a challenge when you want to limit access to only those in the current chat. All files uploaded to a Teams Chat are stored in the uploader’s OneDrive for Business.
This is important to prevent “People in my organization” links being created within OneDrive which will help tackling oversharing.
Setting Default Sharing Links
From the UI, you can set the File and Folder default link
setting for SharePoint and OneDrive using the DefaultSharingLinkType
property. However, for more specific control, you should use OneDriveDefaultShareLinkScope
or CoreDefaultShareLinkScope
.
- OneDriveDefaultShareLinkScope: Sets the default sharing link scope for OneDrive.
- CoreDefaultShareLinkScope: Sets the default sharing link scope for SharePoint sites.
Similarly, for setting default permissions, use CoreDefaultShareLinkRole
or OneDriveDefaultShareLinkRole
instead of DefaultLinkPermission
.
- CoreDefaultShareLinkRole: Defines the default permission level for sharing links in SharePoint.
- OneDriveDefaultShareLinkRole: Defines the default permission level for sharing links in OneDrive.
PowerShell Script
PnP PowerShell
set-pnptenant -OneDriveDefaultShareLinkScope SpecificPeople -OneDriveDefaultShareLinkRole View
SPO PowerShell
set-spotenant -OneDriveDefaultShareLinkScope SpecificPeople -OneDriveDefaultShareLinkRole View
Result
Running the script will configure the default sharing link to be restricted to ‘Specific People’ with ‘View’ permissions.
Additional Considerations
You may also want to customize tenant-level settings for SharePoint and OneDrive using CoreSharingCapability
and OneDriveSharingCapability
. The options available are:
- Anyone: Shareable with anyone, including external users.
- Organization: Limits sharing within your organization.
- SpecificPeople: Restricts sharing to specific individuals.
- Uninitialized: Default state before an explicit setting is applied.
By configuring these settings, you can ensure that your Teams chats and file sharing are secure and tailored to your organization’s needs.
References
Teams file sharing “People currently in this chat” default option.