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:
| Property | Description |
|---|---|
showForGroupsstring[] | Show the field only when the current user is in at least one of the listed groups. Empty array / omitted = show to everyone. |
hideForGroupsstring[] | Hide the field when the current user is in any of the listed groups. |
enableForGroupsstring[] | Enable the field only when the current user is in at least one of the listed groups. |
disableForGroupsstring[] | 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
Related articles
- visibleIf, conditional visibility
Hide or show any field, section, or button based on the value of other fields. Express the condition once; the runtime evaluates it on every change.
- enableIf, conditional enable/disable
Grey out a field unless an expression returns true. The field stays visible, just locked from editing.