keepcalculator

06 Numbers and Powers

Secure SharePoint Online Against Unauthorized Access

Card No. 06·51405 · Updated · Standard formula, shown below

This guide walks you through the essential steps to lock down your SharePoint Online environment, preventing unauthorized access from both external attackers and internal users with overly broad permissions. You’ll learn how to configure external sharing, manage access requests, set up conditional access, and audit your site’s security posture.

What You’ll Need

  • Global Administrator or SharePoint Administrator access to your Microsoft 365 tenant.
  • Access to the Microsoft 365 admin center and SharePoint admin center.
  • Familiarity with your organization’s data classification and compliance requirements.
  • For conditional access policies, a license that supports Azure AD Premium (e.g., Microsoft 365 E3/E5 or standalone).

Step-by-Step

  1. Set External Sharing to Least Privilege
    In the SharePoint admin center, go to Policies > Sharing. Under “External sharing,” choose the most restrictive option that still meets business needs. For most organizations, “Existing guests” or “New and existing guests” with link settings set to “Only people in your organization” is a good balance. If you don’t need external sharing at all, select “Only people in your organization.” This is your first line of defense against unauthorized access from outside.
  2. Restrict Link Permissions
    Still in the Sharing settings, under “File and folder links,” set the default link type to “Internal” (people in your organization only). Also, set the default link permission to “View” rather than “Edit.” This ensures that even if a user shares a file, the default is read-only, reducing the risk of accidental data modification.
  3. Disable Anonymous Access
    In the same Sharing settings, ensure that “Anyone with the link” is disabled. This prevents the creation of anonymous links that bypass authentication entirely. If you need to share externally, always require sign-in as a guest.
  4. Configure Access Requests
    Under Policies > Sharing, scroll to “Access requests.” Set it to “Allow users to send access requests” and specify an email address for the access request approver. This ensures that when someone tries to access a site they don’t have permissions to, the request goes to a designated owner rather than being auto-approved.
  5. Implement Conditional Access Policies
    In the Microsoft Entra admin center (formerly Azure AD), create a Conditional Access policy that requires multi-factor authentication (MFA) for all users accessing SharePoint Online. Under Cloud apps, select “Office 365 SharePoint Online.” Under Grant, check “Require multi-factor authentication.” Also, consider a policy that blocks access from untrusted locations or devices that are not compliant. This prevents unauthorized access even if credentials are compromised.
  6. Enable and Review Audit Logs
    In the Microsoft 365 Purview compliance portal, ensure that audit logging is enabled. Regularly review audit logs for SharePoint activities, especially permission changes, sharing events, and access from unusual IP addresses. You can use the “Search audit log” feature to filter for specific activities like “SharingSet” or “PermissionChange.” This helps you detect and respond to unauthorized access attempts.
  7. Set Site-Level Permissions
    For each SharePoint site, go to Site permissions and review the members. Remove any users who no longer need access. Avoid using the “Everyone except external users” group for site membership; instead, use specific security groups. Also, consider breaking permission inheritance on subsites or libraries that contain sensitive data, and grant unique permissions to only those who need them.
  8. Use Sharing Policies for External Users
    In the SharePoint admin center, under Policies > Sharing, you can set expiration for external sharing links (e.g., 30 days). This automatically revokes access after a period, reducing the window for unauthorized use. Also, require that external users sign in with MFA if they are guests in your tenant.
  9. Regularly Run Permission Reports
    Use the “SharePoint admin center > Reports” or third-party tools to generate permission reports. Review sites with large numbers of site owners or members. Remove any users who have not accessed the site in over 90 days. This reduces the attack surface.
  10. Enable SharePoint’s Built-in Security Features
    In the SharePoint admin center, under Policies > Access control, enable “Unmanaged devices” to block access from devices that are not compliant with your organization’s policies. Also, set “Idle session sign-out” to a reasonable time (e.g., 1 hour) to prevent sessions from staying open on shared computers.

Common Mistakes

  • Leaving External Sharing Enabled Globally – Even if you think you don’t share externally, the default setting might allow it. Always set the tenant-level sharing to the most restrictive option and then enable it per-site only where needed.
  • Using “Anyone” Links – These links bypass authentication entirely and are a common vector for data leaks. Always require sign-in.
  • Not Reviewing Access Requests – If you don’t set an approver, access requests may be auto-approved or go to a default mailbox that is ignored.
  • Ignoring Conditional Access – Relying on passwords alone is insufficient. Without MFA, a single compromised password can lead to a full tenant breach.
  • Overly Broad Site Permissions – Adding users to the “Site Members” group when they only need read access to one document is a common mistake. Use fine-grained permissions.

Tips

  • Use Security Groups – Instead of adding individual users to SharePoint groups, use Microsoft 365 groups or security groups. This simplifies management and ensures that when a user leaves the company, their access is removed automatically.
  • Set Site Sharing to “Only Site Owners Can Share” – In site settings, under Site permissions > Sharing settings, restrict sharing to site owners only. This prevents members from creating external links.
  • Monitor with Alerts – Set up alerts in the Purview portal for high-risk activities like mass download or unusual sharing. You can create a custom alert policy for “File accessed by anonymous user” or “Permission granted to external user.”
  • Educate Users – Regularly remind users about phishing and the dangers of sharing links. A well-informed user is less likely to accidentally expose data.

Troubleshooting

  • Users are still able to share externally after you disabled it – Check if you have any site-level sharing policies that override the tenant setting. Go to each site’s Site sharing settings and ensure they are set to “Only site owners can share” and “External sharing” is set to “Only people in your organization.” Also, wait up to 24 hours for changes to propagate.
  • Conditional Access policy is blocking legitimate users – If you see sign-in failures, check the sign-in logs in Entra admin center. Look at the error code. If it’s due to MFA, ensure users are enrolled. For location-based policies, exclude trusted IPs if you have a static IP range. Test with a small group first.
  • Access requests are not being sent to the right person – Verify the access request email in the tenant sharing settings. Also, check that the site owner has not disabled access requests at the site level.
  • External guests cannot access a site even though sharing is enabled – Ensure that the guest has accepted the invitation and that the link type is “Specific people” not “Anyone.” Also, check if the guest’s organization has restrictions that block them from signing in.
  • Audit log shows no data – Ensure that audit logging is enabled in the Purview portal. If it’s been disabled, you may need to turn it on and wait up to 24 hours for data to appear.

Frequently Asked Questions

Q: Can I secure SharePoint Online without a premium license?
A: Yes, you can implement many security measures like external sharing restrictions and access requests with a basic Microsoft 365 license. However, Conditional Access policies require Azure AD Premium P1.

Q: How do I prevent users from sharing files with people outside my organization?
A: Set the tenant-level external sharing to “Only people in your organization.” This disables all external sharing. Alternatively, set it to “Existing guests” and then disable sharing on specific sites that contain sensitive data.

Q: What is the difference between “Anyone” and “New and existing guests” links?
A: “Anyone” links allow anyone with the link to access the file without signing in. “New and existing guests” links require the recipient to sign in with a Microsoft account or work/school account, and they are added as guests to your directory.

Q: How often should I review permissions?
A: It’s best to review permissions at least quarterly, but monthly for sites with sensitive data. You can automate this by generating permission reports and scheduling reviews.

Q: Can I block access from specific countries?
A: Yes, you can use Conditional Access policies to block access from specific geographic locations. This is useful if your organization only operates in certain regions.

Q: What should I do if I suspect a breach?
A: Immediately disable the affected user account, revoke any external sharing links, and run an audit log search for activities by that user. Change the site owner passwords and consider resetting tenant admin credentials. Contact Microsoft support if needed.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →