Dynamics Chronicles
Search

Dataverse filter-based security in practice

Published
Author
Lloyd Sebag
Type
Chronicle
Data cards pass through a glowing round sieve; only the violet ones travel on into an open vault, the grey ones fall aside.

For twenty years, Dynamics CRM and then Dataverse have decided who sees a row from who owns it: the owner, their team, their business unit, the hierarchy above them, and whatever was shared on top. Anything else (a territory, a region, a confidentiality level) had to be translated into ownership with business units, access teams or sharing plug-ins. Filter-based security, in preview, adds a second way: a security role can now grant access to the rows that match a FetchXML filter. This article explains the building blocks, the new filtered ownership type, how the model combines with what you already have, and what to keep in mind before you design around it.

As of December 2026, the feature is in preview and documented as prerelease. Do not use it in production yet.

The building blocks

The documentation describes four components.

Component Role
Record Filter A FetchXML query that defines which rows qualify, for example "accounts whose region is West".
Entity Record Filter Links a Record Filter to a table and activates it.
Filter privilege Created by Dataverse when a filter is linked to a table: one privilege per operation (Create, Read, Write, Delete, Append, Append To) for that filter on that table.
Security role Where you grant filter privileges, exactly as you grant ordinary table privileges.

At run time, Dataverse gathers the filter privileges of the user, from their own roles and from the roles of their teams, and a row that matches any authorized filter gets the corresponding access. Filters are additive: several filters in several roles widen access, they never narrow it.

Both the Record Filter and the Entity Record Filter are created from a solution (New > More > Other), according to the maker documentation. The Record Filter stores the FetchXML; the Entity Record Filter takes a name, the Record Filter and the logical name of the target table.

A new ownership type: filtered

When you create a table with Table (advanced properties), the Record ownership list now offers Filtered (preview) next to User or team and Organization. A filtered table:

  • has no owner, only a Created by column;
  • cannot be assigned or shared;
  • does not use the usual ownership-based privileges (no user, business unit or organization depth);
  • grants access only through filter privileges.

To avoid locking everyone out, Dataverse creates a global All records filter for each filtered table and grants it to the System Administrator role. Everyone else sees nothing until you give them a filter.

The ownership type is fixed at creation: the documentation is explicit that an organization-owned table cannot be converted to filtered later. If you think a table might need this model, decide before the first deployment.

Filters on the tables you already have

The part that matters most for existing Dynamics 365 projects is that filters also work on user or team owned and organization owned tables, including standard ones such as account or opportunity. There, they are added to the existing model:

  • owners keep their access, records can still be assigned and shared, and business unit and hierarchy access stay unchanged;
  • a filter privilege grants access to additional rows that match the filter;
  • nothing is ever taken away. If a role already gives organization-level read on the table, a filter cannot restrict it.

The documentation's own example is a salesperson who reads the opportunities they own, plus all the opportunities of their territory through a filter. Another one shows a link-entity on a custom "buddy" table to grant access to the accounts of a colleague you cover for, with the eq-userid operator. That second example is worth noticing: filters can depend on the current user, which is what makes them more than static partitions.

Choosing an ownership model

User or team owned Organization owned Filtered
Record owner, assignment, sharing Yes No No
Business unit and hierarchy access Yes No No
Filter-based security Added to ownership Added to role privileges The only source of access
Typical data Accounts, cases, opportunities Reference and configuration data Data whose access depends on its content

Microsoft positions filtered tables for attribute-based access control (ABAC): entitlement-based access, geographic segmentation, regulatory boundaries, data classification. A practical reading:

  • Keep user or team ownership when the business really has a notion of "my records": pipelines, case queues, manager views. Add filters for the exceptions (cover for a colleague, read a territory).
  • Use filtered ownership for new tables where nobody owns a row and access follows the data: contracts by country, documents by sensitivity, products by brand.
  • Use filters on organization tables when shared reference data needs scoped visibility, and make sure no other role grants broader read on the same table.

Example: regional access to a custom table

Suppose a filtered table contoso_agreement with a choice column contoso_region. Sales users in the West region must read and update West agreements; a legal team reads everything with the classification "Restricted".

First, write one FetchXML per rule. You can build it in the view editor of a model-driven app and use Download FetchXML, or with the FetchXML Builder in XrmToolBox.

<fetch version="1.0" mapping="logical">
  <entity name="contoso_agreement">
    <attribute name="contoso_agreementid" />
    <filter type="and">
      <condition attribute="contoso_region" operator="eq" value="100000001" />
      <condition attribute="statecode" operator="eq" value="0" />
    </filter>
  </entity>
</fetch>
<fetch version="1.0" mapping="logical">
  <entity name="contoso_agreement">
    <attribute name="contoso_agreementid" />
    <filter type="and">
      <condition attribute="contoso_classification" operator="eq" value="100000002" />
    </filter>
  </entity>
</fetch>

Then, in your solution:

  1. Create two Record Filters (contoso_agreement_west, contoso_agreement_restricted) and paste each FetchXML.
  2. Create two Entity Record Filters that link them to contoso_agreement.
  3. Open the security role West sales and grant Read and Write on the West filter of the table. Grant Create too if they create agreements, and think about what they create: a user can create a row that falls outside their own filter.
  4. Open the role Legal and grant Read on the Restricted filter.
  5. Assign the roles to users or, better, to teams.

A user in both roles sees the union of the two filters. An administrator sees everything through the All records filter.

The documentation's first example also filters on statecode. That is a design choice to weigh: with a state condition in the filter, users lose access to a row as soon as it is deactivated.

What to watch out for

It is a preview. Both pages carry the prerelease banner. The model, the screens and the solution components may change before general availability.

Performance. The FAQ confirms that every query applies the filter permissions. Keep filters simple, filter on indexed columns, be careful with link-entity chains, and test with realistic data volumes and users who hold many roles.

Dataverse search. When a filter uses a link-entity, Dataverse search returns results from the primary table only, without the values of the linked table.

Virtual tables. Filter permissions are not available on external virtual tables.

Additive only. You cannot use a filter to hide rows that ownership, sharing or a broader privilege already exposes. If your requirement is "nobody outside legal may read restricted agreements", the table must not grant broader read anywhere else, which is easier to guarantee with a filtered table than with a user-owned one.

Testing access. In your plug-ins and client code, keep checking access the usual way (RetrievePrincipalAccess on a row, privilege checks for creation) rather than re-implementing the filter logic, which would drift from the configuration.

Tooling is still catching up. Today, filters are created as generic solution components and the FetchXML is pasted by hand. Microsoft's roadmap lists a dedicated experience to create and manage filter-based security filters in the maker portal; its dates are not confirmed on Microsoft Learn yet.

Not only for internal users

Filter-based security is also the engine of a wider change. In A deep dive into Power Pages Enhanced Authorization, the Power Pages team explains that, when a site opts in, each table permission is translated into Dataverse privileges that use record filters, and the Global, Contact, Account and Parent scopes become filters. A new Custom scope lets makers write their own FetchXML condition. In other words, the same mechanism will decide what external users of a portal can see, evaluated by Dataverse rather than by the portal runtime. Learning it now pays off on both sides.

Key takeaways

  • A security role can now grant access to the rows that match a FetchXML filter: Record Filter, Entity Record Filter, filter privileges per operation.
  • On user, team and organization owned tables, filters only add access. On the new filtered tables, they are the only source of access, and records have no owner.
  • The ownership type cannot be changed later: decide early for tables whose access depends on their content.
  • It is a preview: prototype it, measure query performance, and wait for general availability before relying on it in production.

Researched and drafted with AI assistance, then reviewed, edited and published by a human.

Sources

  1. Filter-based security in Microsoft Dataverse (preview)learn.microsoft.com
  2. Filtered record ownershiplearn.microsoft.com
  3. A deep dive into Power Pages Enhanced Authorizationdevblogs.microsoft.com