Audience trimming, group-based visibility & enable

Show, hide, enable, or disable fields based on SharePoint or Entra group membership, no code required.

Audience trimming controls which fields a user sees based on their membership in SharePoint or Entra security groups. Use it when the gate is who you are rather than what you typed.

Four group-based properties live on every component:

PropertyDescription
showForGroups
string[]
Show the field only when the current user is in at least one of the listed groups. Empty array / omitted = show to everyone.
hideForGroups
string[]
Hide the field when the current user is in any of the listed groups.
enableForGroups
string[]
Enable the field only when the current user is in at least one of the listed groups.
disableForGroups
string[]
Disable the field when the current user is in any of the listed groups.

How groups are resolved

The runtime calls Microsoft Graph at form load to fetch the current user's effective group membership (transitive, nested groups count). Groups can be referenced by:

  • Display name, easiest, but breaks if the group is renamed
  • Object ID (GUID), most robust, recommended for production forms
  • SharePoint group name, for site-scoped groups (Owners, Members, Visitors)

Server-side enforcement

Audience trimming is a UI affordance, not a security boundary. A user with write access to the SharePoint list can submit values via the REST API regardless of what the form trimmed away. If a field must not be writable by certain users, enforce that with SharePoint column permissions or a flow that resets the value on save, not just an audience rule.

Combining audience with conditional rules

Audience and expression rules combine with AND for visibility/enable. A field shown only to Finance AND only when Amount > 10000 needs both conditions met.

Show approval button only to managers AND when amount > $10k

showForGroups: ["Managers"]
visibleIf: {Amount} > 10000

Related articles