M365 Show Podcast

Stop Blind External Sharing—Catch It Before Disaster


Listen Later

You’ve spent months building a secure M365 environment, but one click can open the door to your entire document library. Frustrated by blind spots in SharePoint and OneDrive sharing?We’ll walk through a practical framework—policies, scripts, alerts—that lets you finally see and control what’s leaving your tenant, even at massive scale.Why Your Audit Settings Might Be Lying to YouIf you’ve ever opened your audit logs and felt a quiet sense of relief, thinking everything is covered—there’s a good chance you’re missing some of the biggest gaps. Most admins tick the auditing box in the compliance center and assume job done. They set the policy, see “audit log search enabled,” and move on. But Microsoft 365, especially SharePoint and OneDrive, hides a lot of nuance under those options. The default settings feel comprehensive, but the cracks show up at the worst possible times—like months into a sharing fiasco, when everyone is digging through logs and realizing half the story isn’t even there.Let’s take one scenario that comes up more often than we’d like. Imagine your finance team needs to work with an external consultant on a set of sensitive budgets. The SharePoint site owner shares a folder, makes it easy for the consultant with a guest link, and gets back to business as usual. Fast forward a few months—the consultant’s project finishes, and suddenly there’s an audit. The finance lead wants to know exactly what got shared, when, and with whom. You open the audit logs and…find nothing useful. No entries tracking when that folder link was created, no logs showing access or downloads. The environment looked secure, but the actual audit trail? Like Swiss cheese, more holes than data.Here’s the part that catches people out: Microsoft’s default audit policies are optimized for performance, not completeness. The documentation buries this point, but if you go digging through recent admin guides, you’ll notice that standard audit logs can miss entire categories of sharing actions. This is especially true for anonymous or guest access links. Any auditor who’s been burned by missing entries—like for “SharePoint external sharing invitation created” or “OneDrive anonymous link used”—knows the pain of scrambling to rebuild what happened after the fact.We’ve worked with organizations where the official stance was, “We’re secure, we have auditing.” Then, during a compliance review—maybe after a legal hold was triggered—someone tries to track back an external share. Instead of clear logs, they find entire gaps. During a recent legal review for a healthcare org, legal counsel pulled up the audit log to find out who accessed protected health info via a guest link. The entries stopped right before things really went off the rails. The project had to pause, teams went scrambling, and, worst of all, no one could say for sure what left the building and what stayed internal. It’s exactly this kind of uncertainty that puts compliance projects at risk and sends everyone into damage control mode.If you want a visual, picture two screens side by side. On the left: an environment running Microsoft’s out-of-the-box audit policies. The list of sharing events looks reassuring at first—until you notice the missing records for guest link creation, file previewing by external users, or cases where links were forwarded inside a thread. On the right: the same site, but audit logs are configured with advanced settings—catching not only who shared what but exactly how those links behaved after the fact. External accesses show up with timestamps, the types of links are noted, and even which files were accessed through a chain of guest forwards. You don’t just have a log—you have a map of what really happened.So why does this keep happening? For most environments, three audit policy settings don’t get touched during rollout. First, you need to explicitly enable enhanced auditing for SharePoint and OneDrive, which often means using PowerShell to set policy at the organization level. Without it, “sharing events” covers just a narrow slice of what’s actually going out. Second, make sure to capture “anonymous link usage,” not just link creation. Sharing to someone outside the org—and then having those links get broadly distributed among personal accounts—creates a gap if usage isn’t logged. Finally, increase your log retention window. The 90-day default might sound generous, but with guest projects or legal investigations, you’ll want a much longer trail. The difference between having six months of forensics and three months can be the difference between answering a regulator’s question or drawing a blank.Here’s where things get real: even the best reporting scripts or fancy dashboards mean nothing if the raw log data isn’t there to begin with. Too many teams race ahead into automation or SIEM integrations, only to hit a wall when the base audit configuration is half-baked. If your compliance officer or legal team is expecting clarity and the logs can only tell a fragment of the story, you’re not just at risk—you’re flying blind.So, what do you actually need to flip for full visibility? Enable advanced auditing for SharePoint and OneDrive at the tenant level, make sure you’re logging every kind of external link and internal sharing event, and bump your retention out as far as compliance allows. It’s not about getting more data for the sake of it—it’s about having a record of every action that matters before a rogue file share lands in the wrong inbox. Now, with your audit logs finally collecting the right events, the floodgates open. That’s where the real challenge kicks in: how do you cut through the noise and find the risky activity that actually deserves your attention?Turning Audit Noise into Action: PowerShell Done RightIf you’ve ever tried to make sense of a SharePoint or OneDrive audit log, you already know the feeling: the data just keeps piling up. It’s not just overwhelming. It’s relentless. Yesterday’s export was long enough; today, it’s grown by another few thousand rows. You scroll through page after page, but instead of finding a crisp timeline of risky events, you’re buried in a spreadsheet that reads like a court transcript of every click in your environment. Getting the logs isn’t the hard part anymore—anyone with proper permissions can run a command and spit out every sharing event that’s happened across the tenant. The real challenge? Knowing what even matters in the first place.Now, exporting this data is almost a rite of passage for Microsoft 365 admins. Fire up PowerShell, connect to Security & Compliance, and maybe you aim for a week’s worth of data just to keep things manageable. But then you hit that “Export Results” button and end up with ten, maybe twenty thousand lines in a CSV. What are you supposed to do with a mountain of information like that? Sift through one row at a time, cross-check email addresses, and hope something catches your eye? That’s not monitoring. It’s digital archaeology.The reality is, most PowerShell reporting scripts you’ll find out there scrape everything with broad queries—Get-AdminAuditLogConfig, Search-UnifiedAuditLog, Export-MailboxAuditLog—the list goes on. You get a master list of events, but nearly every script throws it into a file as-is. These exports aren’t smart. You have the “Who,” the “What,” maybe the “When.” But try figuring out which events point to risky behavior—users sharing intellectual property, HR files landing in the wrong inbox, or a guest link sneaking out to someone’s personal Gmail. Instead, you’re left with endless logs of who opened a file, who updated a document, and scattered references to sharing invitations, with no context about what’s sensitive or who’s truly an outsider.Let’s drop into a real scenario. Picture an admin—let’s call them Sam—tasked with reviewing external sharing throughout the month. Sam dutifully pulls down the logs every Friday, only to see spreadsheets stretch into the tens of thousands. One tab shows hundreds of “SharingCreated” and “SharingSet” events. There’s a list of usernames, a hundred different document titles, and a blur of timestamps. But at no point do these logs scream “Red Alert.” Sam’s supposed to find patterns, but the patterns are hidden by noise. For every actual risk—a confidential team plan sent outside the company—there are a thousand routine shares between project teams or calendar invites. Sam starts flagging by gut feeling, but it’s guesswork.Here’s where that old saying rings true: context is everything. Knowing that someone shared “Budget-2024.xlsx” is mildly interesting; knowing that it was sent to “[email protected]” instead of a partner domain is a headline. This is the critical difference between the raw audit logs and truly actionable intelligence. It isn’t just about tracking “who shared what”—that’s the easy part. The real insight comes from answering, “Was that document actually sensitive? Was it shared with someone extern to the business? Did it involve a OneDrive link that’s been opened by a personal email, or did it target a known business partner?” If your reporting script can’t answer all that, you’re still stuck in the fog.This is the point where most people realize: the tools you find online aren’t enough. Let’s play out a comparison. On one side, you’ve got the generic script—Export-UnifiedAuditLog, default columns, no filtering. You end up with a firehose of data, every event labeled “SharingInitiated” or “AnonymousLinkCreated” but with zero prioritization. On the other side, imagine a targeted PowerShell report that does some real lifting: it checks the target email address, flags domains outside your company, and pulls in file sensitivity labels. Suddenly, your report highlights suspicious shares—“HR-Benefits.pdf” sent to a Gmail address shows up red; project plans shared with partners stay green. The data tells a story.Plenty of organizations have seen this play out, especially as remote work ramps

Become a supporter of this podcast: https://www.spreaker.com/podcast/m365-show-podcast--6704921/support.
...more
View all episodesView all episodes
Download on the App Store

M365 Show PodcastBy Mirko