M365 Show -  Microsoft 365 Digital Workplace Daily
M365 Show with Mirko Peters - Microsoft 365 Digital Workplace Daily
Master Dataverse Security: Stop External Leaks Now
0:00
-19:14

Master Dataverse Security: Stop External Leaks Now

Opening – The Corporate Leak You Didn’t See Coming

Let’s start with a scene. A vendor logs into your company’s shiny new Power App—supposed to manage purchase orders, nothing more. But somehow, that same guest account wanders a little too far and stumbles into a Dataverse table containing executive performance data. Salaries, evaluations, maybe a few “candid” notes about the CFO’s management style. Congratulations—you’ve just leaked internal data, and it didn’t even require hacking.

The problem? Everyone keeps treating Dataverse like SharePoint. They assume “permissions” equal “buckets of access,” so they hand out roles like Halloween candy. What they forget is that Dataverse is not a document library; it’s a relational fortress built on scoped privileges and defined hierarchies. Ignore that, and you’re effectively handing visitor passes to your treasury.

Dataverse security isn’t complicated—it’s just precise. And precision scares people. Let’s tear down the myths one layer at a time.


Section 1 – The Architecture of Trust: How Dataverse Actually Manages Security

Think of Dataverse as a meticulously engineered castle. It’s not one big door with one big key—it’s a maze of gates, guards, courtyards, and watchtowers. Every open path is intentional. Every privilege—Create, Read, Write, Delete, Append, Append To, Assign, and Share—is like a specific key that opens a specific gate. Yet most administrators toss all the keys to everyone, then act surprised when the peasants reach the royal library.

Let’s start at the top: Users, Teams, Security Roles, and Business Units. Those four layers define who you are, what you can do, where you can do it, and which lineage of the organization you belong to. This is not merely classification—it’s containment.

A User is simple: an identity within your environment, usually tied to Entra ID. A Team is a collection of users bound to a security role. Think of a Team like a regiment in our castle—soldiers who share the same clearance level. The Security Role defines privileges at a granular level, like “Read Contacts” or “Write to a specific table.” The Business Unit? That’s the physical wall of the castle—the zone of governance that limits how far you can roam.

Now, privileges are where most people’s understanding falls off a cliff. Each privilege has a scope—User, Business Unit, Parent:Child, or Organization. Think of “scope” as the radius of your power.

  • User scope means you control only what you personally own.

  • Business Unit extends that control to everything inside your local territory.

  • Parent:Child cascades downward—you can act across your domain and all its subdomains.

  • Organization? That’s the nuclear option: full access to every record, in every corner of the environment.

When roles get assigned with “Organization” scope across mixed internal and external users, something terrifying happens: Dataverse stops caring who owns what. Guests suddenly can see everything, often without anyone realizing it. It’s like issuing master keys to visiting musicians because they claim they’ll only use the ballroom.

Misalignment usually comes from lazy configuration. Most admins reason, “If everyone has organization-level read, data sharing will be easier.” Sure, easier—to everyone. The truth? Efficiency dies the moment external users appear. A single organizational-scope privilege defeats your careful environment separation, because the Dataverse hierarchy trusts your role definitions absolutely. It doesn’t argue; it executes.

Here’s how the hierarchy actually controls visibility. Business Units form a tree. At the top, usually “Root,” sit your global admins. Under that, branches for departments or operating regions, each with child units. Users belong to exactly one Business Unit at a time—like residents locked inside their section of the castle. When you grant scope at the “Business Unit” level, a user sees their realm but not others. Grant “Parent:Child,” and they see their kingdom plus every village below it. Grant “Organization,” and—surprise—they now have a spyglass overlooking all of Dataverse.

Here’s where the conceptual mistake occurs. People assume roles layer together like SharePoint permissions—give a narrow one, add a broad one, and Dataverse will average them out. Wrong. Roles in Dataverse combine privileges additively. The broadest privilege overrides the restrictive ones. If a guest owns two roles—one scoped to their Business Unit and another with Organization-level read—they inherit the broader power. Or in castle terms: one stolen master key beats fifty locked doors.

Now, add Teams. A guest may join a project team that owns specific records. If that team’s role accidentally inherits higher privileges, every guest in that team sees far more than they should. Inheritance is powerful, but also treacherous. That’s why granular layering matters—assign user-level roles for regular access and use teams only for specific, temporary visibility.

Think of the scope system as concentric rings radiating outward. The inner ring—User scope—is safest, private ownership. The next ring—Business Unit—expands collaboration inside departments. The third ring—Parent:Child—covers federated units like regional offices under corporate control. And beyond that outer ring—Organization—lies the open field, where anything left unguarded can be seen by anyone with the wrong configuration. The castle walls don’t matter if you’ve just handed your enemy the surveyor’s map.

Another classic blunder: cloning system administrator roles for testing. That creates duplicate “superuser” patterns everywhere. Suddenly the intern who’s “testing an app” holds Organization-level privilege over customer data. Half the security incidents in Dataverse environments result not from hacking, but from convenience.

What you need to remember—and this is the dry but crucial part—is that Dataverse’s architecture of trust is mathematical. Each privilege assignment is a Boolean value: you either have access or you do not. There’s no “probably safe” middle ground. You can’t soft-fence external users; you have to architect their isolation through Business Units and minimize their privileges to what they demonstrably need.

To summarize this foundation without ruining the mystery of the next section: Users and Teams define identities, Security Roles define rights, and Business Units define boundaries. The mistake that creates leaks isn’t ignorance—it’s false confidence. People assume Dataverse forgives imprecision. It doesn’t. It obediently enforces whatever combination of roles you define.

Now that you understand that structure, we can safely move from blueprints to battlefield—seeing what actually happens when those configurations collide. Or, as I like to call it, “breaking the castle to understand why it leaks.”

Section 2 – The Leak in Action: Exposing the Vendor Portal Fiasco

Let’s reenact the disaster. You build a vendor portal. The goal is simple—vendors should update purchase orders and see their own invoices. You create a “Vendor Guest” role and, to save time, clone it from the standard “Salesperson” role. After all, both deal with contacts and accounts, right? Except, small difference: Salesperson roles often have Parent:Child or even Organization-level access to the Contact table. The portal doesn’t know your intent; it just follows those permissions obediently.

The vendor logs in. Behind the scenes, Dataverse checks which records this guest can read. Because their security role says “Read Contacts: Parent:Child,” Dataverse happily serves up all contacts under the parent business unit—the one your internal sales team lives under. In short: the vendor just inherited everyone’s address book.

Now, picture what that looks like in the front-end Power App you proudly shipped. The app pulls data through Dataverse views. Those views aren’t filtering by ownership because you trusted role boundaries. So that helpful “My Clients” gallery now lists clients from every region, plus internal test data, partner accounts, executive contacts, maybe even HR records if they also share the same root table. You didn’t code the leak; you configured it.

Here’s how it snowballs. Business Units in Dataverse often sit in hierarchy: “Corporate” at the top, “Departments” beneath, “Projects” below that. When you assign a guest to the “Vendors” business unit but give their role privileges scoped at Parent:Child, they can see every record the top business unit owns—and all its child units. The security model assumes you’re granting that intentionally. Dataverse doesn’t second-guess your trust.

The ugly part: these boundaries cascade across environments. Export that role as a managed solution and import it into production, and you just replicated the flaw. Guests in your staging environment now have the same privileges as guests in production. And because many admins skip per-environment security audits, you’ll only discover this when a vendor politely asks why they can view “Corporate Credit Risk” data alongside invoice approvals.

Now, let’s illustrate correct versus incorrect scopes without the whiteboard.
In the incorrect setup, your guest has “Read” at the Parent:Child or Organization level. Dataverse returns every record the parent unit knows about. In the correct setup, “Read” is scoped to User, plus selective Share privileges for records you explicitly assign. The result? The guest’s Power App now displays only their owned vendor record—or any record an internal user specifically shared.

This difference feels microscopic in configuration but enormous in consequence. Think of it like DNS misconfiguration: swap two values, and suddenly traffic answers from the wrong zone. Same here—change one privilege variable, and your environment acts as a global directory instead of a private workspace.

And when this leak meets Power Apps’ convenience features—views, Dataverse connectors, dataflows—you amplify the exposure. A Power BI report connected to the same environment could now display aggregated client metrics that include confidential datasets, all because one security role told Dataverse that “guests are basically us.”

At this point, our fictional vendor probably shouldn’t be blamed—they just clicked. You, however, just created a compliance nightmare. GDPR, SOC 2, internal audits—it doesn’t matter which alphabet agency governs you; all they’ll see is that external identities had unnecessary record visibility. That’s when the emails start: “Can you prove guests never exported that data?”

The moral here isn’t paranoia—it’s architecture. Dataverse doesn’t interpret moral intent. It enforces Boolean logic. Misconfigured equals exposed. That’s why least privilege and proper role scoping aren’t optional—they’re survival mechanisms.

Enough horror stories. Let’s fix the leak instead of admiring it.


Section 3 – Build the Fortress: Lock Down Dataverse Like a Pro

Step one: separate the inhabitants. Create distinct Business Units for internal and external actors. Internal staff live under the core business unit tree. External vendors get isolated in a standalone child unit, ideally at the lowest level. Why lowest? Because Parent:Child scope flows downward, not upward. That means no internal user ever inherits visibility from the guest unit, but you can still share specific records upward when needed. It’s like building the servants’ quarters outside the main courtyard—useful, but separated by a gate.

Step two: redesign your Security Roles from scratch, not by cloning.
Guests should have privileges limited to: Read (User), Append To (User), Share (None), and possibly Create on certain low-sensitivity tables if they need to submit data. Nothing more. When you’re tempted to tick higher scopes, ask yourself: “Would I want this role applied to a stranger?” If the answer produces hesitation, the answer is no.

Now, rather than granting access through broad roles, use Access Teams for precision targeting. Access Teams let you share records directly with individuals or groups without handing them persistent powers. For instance, a project manager can automatically assign a vendor’s team access to a single “Purchase Order” record through automation. Once the project ends, revoke the template team—instant evaporation of access.

Team Ownership vs. User Ownership strategy is another underrated safeguard. When a record belongs to a Team, you control access by adjusting that Team’s privileges in one place. When records are individually owned by users, access control fragments like confetti—it becomes unpredictable, inconsistent, and impossible to audit at scale. For external data, let Teams own the records; that way, you can disable the team or its membership in seconds without scanning every table.

Next, deploy Field-Level Security Profiles on sensitive columns. Even inside a shared table, you can hide financial fields or personal identifiers from guests. They’ll still see the record but encounter blank or masked columns for restricted attributes. Field-level security is your castle’s inner vault—it ensures even authorized visitors can’t peek at crown jewels.

Then tie this fortress into Entra ID Governance. Use dynamic group membership to automatically assign or remove users from Dataverse Teams based on their directory attributes. Terminate a contract, and their role evaporates from Dataverse within minutes. This automation eliminates the “forgot to remove” scenario that leads to zombie guest accounts lingering long after offboarding.

At this stage, your logical structure should read like a military hierarchy: isolated units, precise roles, field masks, dynamic membership. But here’s the pitfall—testing. Many admins want to confirm access and think, “I’ll just clone my admin account and test from there.” Congratulations, you just introduced another overpowered identity. Never test as admin. Create a dummy guest in the external unit, assign them the proposed role, and confirm data scope from that view. If they see more than one record, something’s wrong.

Another pragmatic layer: appoint a “Security Steward” for Dataverse environments. This isn’t a full admin—more like a patrol captain. Their sole task is to review business units, role assignments, and Access Teams weekly. They don’t configure production; they report anomalies. It’s the digital equivalent of shaking the locks every night.

Let me share a quick internal example. A manufacturing client built this structure—internal BUs for departments, external BU for suppliers, Access Teams for each order, and Entra dynamic cleanup rules. Before the change, forty-seven external accounts had access to organization-wide contact data. After architectural correction, that number dropped to three tightly scoped supplier records per guest. No code rewritten. Just boundaries realigned.

Common mistakes worth avoiding:
One, role inheritance stacking—assuming narrow roles cancel broader ones. They don’t. You must explicitly design the smallest intersection. Two, duplicating admin privileges “for troubleshooting.” Don’t. Assign temporary elevated roles via time-bound groups instead. Three, ignoring systemic updates. Microsoft occasionally adjusts Dataverse security behavior; monitor release notes and revalidate your structure. Fortresses decay when maintenance stops.

Integrate Power Automate to manage routine controls. For instance, run a flow weekly that lists all guest users with business-unit associations and email discrepancies to your steward. Automation isn’t just convenience; it’s institutional memory for humans who forget.

By now, you’ve rebuilt Dataverse into something resembling an actual fortress: segmented walls, controlled gates, retractable bridges. External users can perform their tasks, internal staff keep oversight, and guests can’t wander through the keep. Perfect? No. Defensible? Absolutely.

Once your fortress stands, remember—walls alone don’t keep enemies out forever. Someone has to patrol them. That patrol begins with governance and ends with continuous monitoring, but that’s in the next section. For now, appreciate your creation: a Dataverse security model that finally behaves like the system Microsoft designed it to be—granular, logical, and, when respected, leak-proof.

Section 4 – Governance, Auditing, and Continuous Defense

Here’s the uncomfortable truth: no fortress stays secure by architecture alone. You can build the strongest walls in Dataverse, but human error—your employees, your contractors, your “temporary” admins—keeps finding new ways to tunnel through them. Governance isn’t a phase you complete; it’s a hygiene routine you repeat.

Start with visibility. The Power Platform Admin Center is your watchtower. From there, audit who owns what and who’s sharing it. You’ll find patterns—users owning thousands of records when they should own ten, or guest identities appearing under the wrong business unit. Every such pattern is a potential breach. Set a monthly reminder: open the Admin Center, sort user ownership by count, and investigate outliers. Security isn’t about trusting your users; it’s about verifying how much damage they could do.

Next, bring in Microsoft Purview. Most people think of Purview as a DLP tool for Exchange or SharePoint. In reality, it now extends to Dataverse environments. With it, you can create Data Loss Prevention policies that restrict connectors, block exports, and prevent embedding sensitive Dataverse data into other services. Treat it like the castle’s customs checkpoint—no one leaves with valuables uninspected. Set DLP policies that block guests from exporting via Excel or Power BI. If you need analytics for guests, build curated datasets, not open pipelines.

Then there’s audit history. Dataverse provides a full audit log that records changes to records, roles, teams, and field-level data. Turn it on for every sensitive table, especially Contacts, Opportunities, and Custom tables carrying PII. Use environment-level analytics to identify recurring guest activity or bulk data access—both signs of privilege misuse. If you spot a guest reading too many records too quickly, assume automation or misconfiguration, not curiosity, and act immediately.

Now let’s discuss process, not panic. You need a repeatable cycle. Integrate security reviews directly into your change management pipeline. Any new table, app, or automation hitting production should go through a “Security Role Diff Check.” Essentially: compare the roles being deployed to baseline templates. If they include increased scopes—Parent:Child or Organization—pause the deployment. It’s easier to argue with developers than with auditors.

Add three quick checks per month to your governance routine.
First, list all guest accounts in Dataverse; verify if they still exist in Entra ID and belong to active suppliers. Expired contract? Remove instantly.
Second, check all Business Units for members belonging to the wrong department or duplicate units created by mistake. Inconsistent hierarchies breed invisible access chains.
Third, review solutions for embedded security roles. Managed solutions often slip through code review because they appear harmless—until they bring Organization-level privileges along for the ride. Three checks. Thirty minutes. Infinite peace of mind.

Automation helps. Create a Power Automate flow that runs a security summary weekly and posts in Teams: “Guest count: 14, Admin roles assigned: 3, High-scope roles changed this week: 1.” Seeing those numbers regularly trains everyone to care. With time, people notice anomalies before crises erupt.

Finally, treat governance as culture, not punishment. Security reviews shouldn’t feel like surprise quizzes. Train your citizen developers—those building Power Apps in departments—to understand least privilege. Give them templates for safe roles, explain why Dataverse isolation matters, and make audits routine rather than reactive. The less mysterious governance feels, the fewer leaks you’ll clean up later.

A short story to drive it home: I once reviewed a client environment where 90% of users had “System Customizer.” They believed it was “harmless” because customization wasn’t data access. Except the role also had Organization-level read on multiple tables. Every intern could export client PII. Nobody had noticed because “no one ever looked.” The fix didn’t require genius—just attention. Attention scales; negligence multiplies.

Security’s final truth: it’s easier to defend continuously than to repair occasionally. Think of Dataverse like a living organism. It needs monitoring, patching, and nutrients in the form of periodic review. Leave it alone, and permissions creep in like cholesterol buildup—clogging the arteries of compliance until one day, the system collapses under its own complexity.

So, treat your governance routine like brushing your teeth. Skip it once, you survive. Skip it for months, you’ll need root canal—or, in this case, a forensic audit. Continuous defense isn’t paranoia. It’s discipline. And in Dataverse, discipline is security’s only real guarantee.


Conclusion – The Three Rules of Dataverse Security

You’ve seen the anatomy of a leak, the blueprints of containment, and the routines of vigilance. Now, distill all that noise into three immutable laws.

Rule one: Least privilege always. If a user can complete their task with less access, you’ve configured correctly. Every checkbox should justify its existence like a budget request.

Rule two: Isolate by business unit. Treat internal, external, and partner groups as sovereign realms inside your organization. When in doubt, add a wall, not a doorway.

Rule three: Monitor relentlessly. Watch ownership changes, role drift, and guest activity every week. Because Dataverse won’t warn you—it will simply obey the privileges you gave it.

That’s the real takeaway: Dataverse is obedient but not forgiving. It executes logic precisely, even when that logic exposes your secrets. Understanding roles and boundaries doesn’t just prevent leaks—it prevents embarrassment, investigations, and those late-night Teams calls from Legal.

If this saved you an audit, repay the universe: subscribe for more Power Platform governance dissections. Efficient knowledge distribution is the one leak we do encourage. Or, of course, you can keep guessing who still has access—auditors adore surprises.

Discussion about this episode

User's avatar