CASB for OneDrive in 2026: API vs Inline Controls, What Each One Catches, and How to Choose

Last updated: December 1, 2026
Short answer: A CASB for OneDrive does two separate jobs. An API connection scans your company's OneDrive for sensitive files that are shared publicly or with outsiders and removes that sharing. An inline control watches uploads as they happen and stops corporate data from landing in a personal OneDrive or another company's tenant. Most OneDrive leaks fall into one of those two buckets, so a good setup covers both, and Microsoft's own tooling is changing in January 2027.
Disclosure: dope.security wrote this post, and we sell a CASB (CASB Neural) and an on-device secure web gateway (dope.swg). Every statement about another vendor links to that vendor's own documentation.
This guide is for IT and security teams on Microsoft 365: what Microsoft gives you, what CASB vendors add, and which questions separate a real OneDrive control from a data-sheet checkbox. If you're looking for a step-by-step sharing audit instead, see our OneDrive file sharing security audit.
Key takeaways
- Two jobs, two architectures. API CASBs handle data at rest and sharing inside your tenant. Inline CASBs handle data in motion, especially uploads to personal OneDrive accounts.
- Microsoft is moving file policies. Defender for Cloud Apps file policies retire on January 6, 2027, and Microsoft says to rebuild them in Purview DLP (Microsoft Learn).
- Personal OneDrive is the gap native tools struggle with. Microsoft's tenant restrictions don't block anonymous access to consumer OneDrive, and Microsoft's own workaround is to block onedrive.live.com at a proxy (Microsoft Learn).
- Ask about the client, not just the browser. Some inline controls apply only to browser sessions, not to the OneDrive sync app.
What does a CASB do for OneDrive?
A cloud access security broker (CASB) sits between your users and a cloud app and applies your security policy to it. For OneDrive, that policy usually covers four risks:
| Risk | Example | Which CASB mode handles it |
|---|---|---|
| Public links on sensitive files | A payroll spreadsheet shared with "Anyone with the link" | API |
| External sharing that outlived the project | A contract folder still shared with a former vendor | API |
| Uploads to a personal OneDrive | An employee drags a customer list into their personal OneDrive | Inline |
| Uploads to someone else's tenant | A file uploaded to a partner's or competitor's OneDrive for Business | Inline |
API mode connects to Microsoft 365 through Microsoft Graph with admin consent. It can see every file in your tenant, including years of old shares, and it can change sharing after the fact. It can't see anything outside your tenant, so it never sees a file uploaded to a personal account.
Inline mode sees traffic as the user sends it. It can tell your corporate OneDrive apart from a personal one, block or allow the upload, and inspect the file before it leaves. It can't fix a public link that was created two years ago.
That's why vendors like Skyhigh document both an "OneDrive API" and an "Inline Reverse Proxy" architecture for the same app (Skyhigh).
What can Microsoft's own tools do for OneDrive?
Credit where it's due: Microsoft gives you a lot before you buy anything. Here's what its docs say each tool does, and where it stops.
- Defender for Cloud Apps file policies scan connected apps, including OneDrive, through the provider's APIs and can apply governance actions such as removing external users or making a file private (Microsoft Learn). File policies retire on January 6, 2027 (Microsoft Learn).
- Purview DLP is where Microsoft wants those policies to go. Microsoft's migration guide notes that Purview's sharing remediation can block access for people outside the organization but "doesn't change existing sharing," and suggests Power Automate to remove existing shares (Microsoft Learn). If you rely on file policies to strip old public links today, plan for that change.
- Conditional Access app control gives you session policies that can block downloads or uploads in real time. Microsoft says session controls "apply only to web browser–based access" (Microsoft Learn), so desktop and sync-client paths need separate access policies.
- Tenant restrictions v2 can block sign-ins to other tenants and to consumer Microsoft accounts. Microsoft lists "anonymous blocking to consumer OneDrive accounts" as unsupported and says to block
https://onedrive.live.com/at a proxy instead (Microsoft Learn). - OneDrive sync app policies include "Prevent users from syncing personal OneDrive accounts" and "Allow syncing OneDrive accounts for only specific organizations" (Microsoft Learn). These help with the sync app, but they don't control what a user uploads through a browser.
The pattern: Microsoft is strong inside your tenant and weaker at the edge, where a corporate file leaves for an account you don't own.
API vs inline CASB for OneDrive: which risks does each catch?
| Question | API CASB | Inline CASB |
|---|---|---|
| Finds old public links in your tenant | Yes | No |
| Removes external sharing after the fact | Yes | No |
| Classifies files already stored in OneDrive | Yes | No |
| Stops an upload to a personal OneDrive | No | Yes |
| Tells your tenant apart from another company's | Not applicable | Yes, if it's instance-aware |
| Works on phones | Yes, since it reads the tenant | Depends on the vendor's coverage |
| Needs admin consent in Microsoft 365 | Yes | Usually not, but needs traffic steering |
If you can fund only one this year, follow your incidents: public links point to API first, personal-account uploads point to inline first.
How do the main CASB vendors handle OneDrive?
The table below summarizes what each vendor documents publicly. We list dope.security first because we wrote this post; every other row links its source.
| Vendor | API controls for OneDrive | Inline controls for OneDrive | Worth knowing |
|---|---|---|---|
| dope.security | CASB Neural scans your Microsoft 365 tenant for publicly and externally shared files, classifies public files for PII, PCI, PHI and IP, and removes public or external sharing from dope.console (docs) | dope.swg Cloud Application Control limits Microsoft 365 to the email domains you allow; Dopamine DLP inspects uploads to personal OneDrive accounts (docs) | Inline coverage is for Mac and Windows devices with the endpoint installed. It doesn't cover phones. |
| Microsoft (Defender for Cloud Apps, Purview) | File policies with governance actions; retiring January 6, 2027 in favor of Purview DLP (Microsoft Learn) | Session policies through Conditional Access app control, browser sessions only (Microsoft Learn) | Purview remediation doesn't change existing sharing |
| Skyhigh Security | Near real-time scanning, generally within 10–15 seconds of file activity; can quarantine or tombstone files (Skyhigh) | Inline reverse proxy option | Requires a Microsoft 365 E1 or E3 license, per the same page |
| Netskope | API-enabled controls for data at rest in OneDrive and SharePoint (Netskope) | Instance awareness to block uploads to personal folders while allowing the corporate account (Netskope) | Netskope's community guide says app instances are available only for OneDrive for Business, and inline CASB licensing is required (Netskope Community) |
| Zscaler | Posture checks and DLP across sanctioned SaaS (Zscaler) | Inline CASB tells personal and corporate OneDrive apart and controls uploads, downloads, syncs, edits and shares (same source) | Written in response to OneDrive's personal/business account switching |
| Palo Alto Networks | SaaS Security Data Security scans existing and new files and supports user and admin quarantine plus removing direct external collaborators (Palo Alto Networks) | Not covered in the cited doc | Onboarding needs a Global Administrator with a valid OneDrive license |
| Cisco | Secure Access SaaS API DLP for SharePoint Online, OneDrive and outgoing Outlook mail (Cisco) | Not covered in the cited doc | Needs a Global Admin service account and Microsoft 365 audit logging turned on |
How does dope.security cover OneDrive?
dope.security covers both halves of the problem with two products that share one console.
CASB Neural: the API side
CASB Neural connects to Microsoft 365 with a one-click admin authorization. It then crawls the tenant, finds every publicly and externally shared file, and keeps monitoring for sharing changes (docs). Instead of regex, a large language model reads each public file and decides whether it contains PII, PCI, PHI or intellectual property, and each finding comes with a short Dopamine summary of what the document is.
From the files table, an admin can select one file or hundreds and choose Remove Public, Remove External, or Remove Public + External. Files that should stay public can be marked "Reviewed" with a comment (docs).
One honest note: our docs say files shared only with an external email address are listed but not classified yet. Public files are classified today.
Cloud Application Control and Dopamine DLP: the inline side
dope.swg runs the proxy on the device itself, which we call the Fly-Direct Architecture. Web traffic doesn't detour through stopover data centers, so there's no proxy hop for web traffic, and sites see the network the device is on.
- Cloud Application Control for Microsoft 365 lets you list the email domains that are allowed. A user who signs in with any other Microsoft 365 account sees a block page. A separate checkbox decides whether personal Microsoft accounts such as outlook.com and hotmail.com are allowed (docs). It's one of 10 apps Cloud Application Control supports (docs). For a walkthrough, see blocking personal Microsoft 365 uploads with Cloud Application Control.
- Dopamine DLP extracts text on the device and has dope.security's cloud classify it. It covers uploads and, on supported AI apps, prompts. For OneDrive, our docs say that when Cloud Application Control is on, uploads to your allowed domains aren't inspected and uploads to personal accounts are (docs). Each policy runs in Monitor or Block mode, with exceptions by user or group.
So if you allow personal Microsoft accounts for email, you can still stop a customer list from going into a personal OneDrive. Ask our team how inline controls handle the OneDrive desktop sync app in your setup.
Which tier includes what?
CASB Neural is in the SWG + CASB and SSE+ tiers. Dopamine DLP is in the SWG + DLP and SSE+ tiers. Cloud Application Control is part of dope.swg itself. SSE+ is the full suite, and it doesn't include ZTNA. You can start free.
Limits to know
- Inline controls cover Mac and Windows devices with the endpoint installed. It doesn't cover phones.
- dope.swg is a web gateway, not a cloud firewall (FWaaS), and we have no built-in ZTNA.
- CASB Neural reads your own tenant. It can't see files in someone else's tenant, which is what the inline side is for.
What should you ask a CASB vendor about OneDrive?
Use these in any evaluation, including ours:
- Does your API integration find existing public links, or only new ones? Backlog matters more than new shares in most first scans. See why publicly shared files are a problem.
- Can you remove existing sharing, or only block future access? Microsoft's own Purview path doesn't change existing sharing.
- How do you tell my OneDrive apart from a personal one, and from another company's? Ask for a live demo with two accounts signed in.
- Does inline control cover the OneDrive sync app, or only the browser? Microsoft's session controls are browser-only.
- What happens when a user is off the corporate network? A control that depends on a tunnel or a data center has to keep that path up.
- What does classification use, regex or a model that reads the file? Regex flags any 16-digit number as a credit card.
- What Microsoft 365 permissions does onboarding need, and who has to approve them? Several vendors require a Global Administrator.
How do you roll out OneDrive CASB controls in four weeks?
- Week 1: Connect the API side and let the first scan run. Don't remediate yet; just measure public and external shares.
- Week 2: Remove public links on files classified as PII, PCI or PHI. Mark intentional public files as reviewed.
- Week 3: Turn on inline controls in Monitor mode. Watch how often users upload to personal OneDrive accounts.
- Week 4: Move the inline policy to Block for sensitive data, add group exceptions, and tell employees what changed.
Frequently asked questions
What is a CASB for OneDrive?
A CASB for OneDrive is a security tool that applies your data policy to Microsoft OneDrive, either by scanning your tenant through Microsoft's APIs or by inspecting uploads inline as users send them.
Is Microsoft Defender for Cloud Apps enough for OneDrive?
It covers a lot inside your tenant, but its file policies retire on January 6, 2027 and move to Purview DLP, and its session controls apply only to browser sessions.
Can a CASB block uploads to a personal OneDrive?
Yes, an inline CASB can block uploads to a personal OneDrive while allowing your corporate account. An API-only CASB can't, because a personal account sits outside your tenant.
What is the difference between API and inline CASB for OneDrive?
API CASB scans files and sharing already in your tenant and can remove risky shares. Inline CASB sees traffic in real time and can stop sensitive files from leaving for accounts you don't own.
Does dope.security work with OneDrive?
Yes. CASB Neural scans your Microsoft 365 tenant for publicly and externally shared files and removes risky sharing, and dope.swg's Cloud Application Control and Dopamine DLP control uploads to personal OneDrive accounts on Mac and Windows devices with the endpoint installed.
Does a OneDrive CASB cover phones?
API scanning covers files no matter which device created them. Inline coverage depends on the vendor; dope.security's inline controls cover Mac and Windows devices with the endpoint installed and don't cover phones.
Email sales@dope.security and we'll set up a walkthrough.



