How to Restrict Anonymous Sharing Links in OneDrive and SharePoint
Question details
An organization is receiving security alerts because employees are creating anonymous access links when attaching files from mapped OneDrive folders.

- Product
- Microsoft OneDrive and SharePoint
- Device & OS
- Windows 11
- Scenario
- Employees are sharing organizational files externally, generating anonymous links that trigger security warnings.
- Observed behavior
- When users select the 'Anyone with the link' option, it successfully generates a public link that can be accessed without signing in, potentially exposing sensitive organizational data.
Verify that you have Microsoft 365 Global Administrator or SharePoint Administrator privileges to modify organizational external sharing policies.
How Employees Create Anonymous Links
Understand the process users follow to generate anonymous links so you can properly identify the source of the security alerts.
By default, if an organization permits it, users can easily create links that do not require the recipient to sign in.
Right-click the target file within the mapped OneDrive or SharePoint folder in Windows 11 and select 'Share'.
Click on the current link permissions and choose 'Anyone with the link' from the sharing options.
Apply the settings and copy the link to share it. Anyone holding this link can now access the document without authentication.
Restrict Anonymous Links via Microsoft 365 Admin Center
Administrators should adjust the tenant-level external sharing policies to prevent users from creating anonymous access links.
Securely Edit and Manage Documents with WPS Office
If you are looking for a highly compatible, secure, and cost-effective office suite, WPS Office provides excellent document management capabilities without the complexity of heavy enterprise administrative tools.
- 1. Download and Install: Visit the official WPS Office website to download the free installer for your operating system.
- 2. Open Your Documents: Launch WPS Office and open your existing Word, Excel, or PowerPoint files instantly without format loss.
- 3. Share Securely: Use WPS Cloud to share documents with specific permissions, ensuring your data remains secure.

Frequently Asked Questions
Why is the 'Anyone with the link' option grayed out in my OneDrive?
This option is grayed out or missing because your organization's IT administrator has disabled anonymous external sharing for security reasons.
Can I set an expiration date for an anonymous sharing link?
Yes, if your organization allows anonymous sharing, you can set an expiration date and a password in the 'Link settings' menu before finalizing the link.
What happens to existing anonymous links if the administrator disables external sharing?
If an administrator changes the policy to restrict external sharing, all previously generated 'Anyone' links will immediately become invalid and users will lose access.





