Home / Technology
Technology

Dynamics 365 Customer Portal Security: How to Protect Customer Data with Entra External ID and Table Permissions

In 2024, researchers at AppOmni went looking at Power Pages sites and found several million sensitive records sitting in the open. One case involved more than 1.1 million NHS employee records. Nobody had hacked anything. The sites were just configured to hand the data to whoever asked.

That’s the uncomfortable part of a Dynamics 365 Customer Portal. The platform ships with sensible defaults. Then a busy team flips a few of them to get a demo working, and the flips stay. Data sits in Dataverse, the portal sits on the public internet, and between them there’s a handful of settings that people configure once and never open again.

Two layers matter most here. One decides who gets through the front door, which is Microsoft Entra External ID. The other decides what they can see once inside, which is table permissions. The remaining hardening list turns out shorter than most teams fear.

Which two questions does the portal have to answer?

Every request gets asked two things, in order. Who are you? And what are you allowed to read?

The first is authentication and the second is authorization, and they fail in different ways. A weak sign-in flow lets the wrong person in. A weak permission model lets the right person read everyone else’s records, and that’s arguably worse, because in the logs it looks like a perfectly normal session.

Microsoft keeps the two apart on purpose. Identity providers live under the Security area of the design studio. Table permissions sit nearby, and they only take effect once attached to a web role. Teams that treat them as one project end up with a beautiful login screen in front of a wide-open data layer.

How does sign-in work with Entra External ID?

Customers have no accounts in your corporate directory, so they need an identity service built for outsiders. For Power Pages, that service is Microsoft Entra External ID. The Learn documentation says it shares foundational technology with Azure AD B2C but runs as a distinct service, managed from the Microsoft Entra admin center and not the Azure portal.

The setup is less glamorous than the name. An external tenant gets created first. Then comes an app registration with the platform set to Web, and the redirect URI has to match the site’s reply URL exactly. Both access tokens and ID tokens get enabled under Authentication, and admin consent gets granted under API permissions. After that, a user flow: email with password, or email one-time passcode. Back in the design studio, the identity provider settings take the client ID, the authority URL, and the OpenID Connect metadata address.

Plenty of people stumble on the small stuff.

Email addresses must be unique. When two contact records share one, deactivated contacts included, neither can authenticate. A data-quality problem that surfaces as a security ticket.

Open registration is on by default. With it enabled, no invitation code is needed, so anyone who can reach the sign-up page can create a contact. Fine for a public storefront. For a portal showing account history, somebody should make that call deliberately instead of inheriting it.

Local authentication still exists, and Microsoft’s own documentation labels it “not recommended.” The best-practices page goes a step further: don’t use it on production sites. A local login form left alive beside a hardened External ID flow just means an attacker picks the weaker door.

Then there’s the contact-mapping setting, which links a sign-in to an existing contact by email address. Microsoft’s guidance is to leave it disabled unless there’s a specific reason. Match on email alone and whoever controls that address inherits the contact, along with everything the contact can see.

Azure AD B2C is the other puzzle, because a lot of existing portals still run on it. Microsoft’s Power Pages documentation continues to list it as a supported provider with no deprecation note. A Dynamics 365 Commerce page, though, says B2C is no longer available for new tenants, with existing ones supported until May 2030 and no new feature work. A team starting fresh has little reason to choose it.

One gap in the External ID page: it never mentions MFA or Conditional Access. Those are Entra capabilities. Whether they apply, and how, gets settled in the tenant itself and not by assuming from the portal side.

Why do table permissions cause most of the exposure?

This is the rule behind most Power Pages incidents. Dataverse data on a portal is protected by table permissions, and a permission does nothing until it’s linked to a web role. Lists and forms pass through the same gate, and so do Liquid and the Web API. When permissions are wrong, they’re wrong everywhere at once.

Each permission picks an access type. That choice is the whole game.

Global access covers every record in the table. Microsoft’s best-practices guidance is blunt: avoid global table permissions for sensitive business data. Global suits a public product catalog. Aimed at cases, invoices, or contacts, it’s a data breach waiting for somebody to log in.

Contact access scopes records to the signed-in user through a relationship, so a customer sees only the cases linked to their own contact. Account access does the same through the user’s account, which is how a company’s staff all see that company’s records and nobody else’s. Self access covers just the user’s own contact record.

A Custom access type also exists, filtering by FetchXML. It’s marked preview, it only works on sites with enhanced authorization turned on, and only the filter element of the FetchXML gets evaluated. Anything else in the query is ignored.

Parent permissions confuse people the most. The access type exists, but only in the Portal Management app. In the design studio, a child permission gets added to an existing one instead. The child needs its own table, a relationship back to the parent’s table, and privileges. Its roles come from the parent, so changing roles means editing the parent. The parent must also carry every role its children have, or the save fails with a message about roles not being available to the parent table permission.

Cleanup brings two surprises. Deactivating a parent leaves its children active but not in effect. Deleting a parent deletes them all. Neither is dangerous. Both catch people off guard.

Anonymous access earns its own warning. Microsoft’s guidance says to treat anonymous table permissions as public data access, because that’s what they are. An Anonymous Users web role exists, and every signed-in contact lands automatically in Authenticated Users. Both ought to carry the least access possible. The AppOmni write-up noted that the backend warns about global access on anonymous roles but says nothing for the authenticated one, so that second case slips through most often.

What about the Web API and the columns people forget?

Table permissions decide which rows a user can touch. Which columns come back is a separate matter.

The Power Pages Web API has its own site settings per table. One switch enables the table. Another lists the fields. Put an asterisk in that list and every column on the table is exposed to anyone the row-level rules allow, internal notes and credit limits included, columns nobody ever meant a customer to see. That was one of the AppOmni findings: the fields setting sitting at a wildcard. Their testers found column-level security almost never in use.

Microsoft recommends enabling the Web API only for tables that need it, each with an explicit allow list of columns. It also splits two situations. Power Pages column permissions are the authorization model for the Web API, while Dataverse column security profiles apply once enhanced authorization is on. One caveat gets skipped in most summaries: Web API column permissions don’t protect data leaving through search, Liquid, FetchXML, forms, or lists. A column hidden from the API can still render on a form.

How should the portal be tested?

Most teams test a portal as the person who built it, which proves almost nothing. A more revealing test uses two throwaway customer accounts on different companies. The first one opens a case and the record URL gets copied. The second one signs in and pastes it. A correct Account-scoped permission returns nothing. A Global one returns the case, and that’s the entire bug in one browser tab.

A third test account with no web role at all earns its keep too. Lists and forms should render empty for it. When they don’t, something is granting access through Authenticated Users that nobody remembers adding.

What does the Security workspace actually check?

The Security workspace in the design studio pulls the pieces together. The monitor holds the scan. Protect covers web roles, page permissions, table permissions, and the Web Application Firewall. Manage handles identity providers, site visibility, and advanced settings.

By default the deep scan runs against anonymous pages only. Ticking the option to include authenticated pages and supplying a test login pushes it into the area behind sign-in, where most sensitive data lives. A summary arrives by email, and a PDF is available. Microsoft recommends running it periodically and after any significant security change. The documentation doesn’t list every check the scan performs, so a clean result reads as a first pass. Nobody should frame it as a certificate.

The audit order that holds up in practice follows the AppOmni checklist: site settings, then table and record permissions, then columns, then column security profiles. Site settings come first because a single wildcard or open-registration flag undoes careful work further down.

A few smaller items round things out. CORS should be limited to approved origins, with credentialed requests never paired with wildcard origins. X-Frame-Options belongs at SAMEORIGIN or DENY, and X-Content-Type-Options at nosniff. Production changes to web roles, table permissions, and identity providers should sit with a short list of people. Dataverse auditing on the sensitive tables closes another gap. And hiding a page from navigation secures nothing; page permissions do that job.

When the native route isn’t the only route

Some teams read all of this and decide they’d rather not own the configuration. Power Pages is one way to build a Dynamics 365 Customer Portal. Packaged portals are another. CRMJetty’s Dynamics 365 Customer Portal handles access differently, with roles carrying module-level permissions, record scoping that is contact-based or account-based per module, OTP-based two-factor sign-in, and Microsoft identity for enterprise sign-in. It does not support SAML, and its documentation says plainly that CRM security roles have no connection to portal user roles. Different trade-offs, and neither route skips the real question. Whichever portal fronts Dataverse, somebody still decides who gets in and what they see.

What actually goes wrong in a Dynamics 365 Customer Portal

Rarely the platform itself. A default gets overridden for a deadline, a wildcard goes in during testing, and nobody comes back to it. The AppOmni findings read like that from start to finish.

The boring fixes are the ones that work: relationship-based permissions, an explicit column list, open registration decided on purpose, local login off, a scan after every real change. Unglamorous. Also the reason some portals never make the news.