Use Security Roles to manage access to views (preview)– Dataverse/ Dynamics 365
Sometimes, we might create a new view for a table, and not everyone in our organization needs to see it — or maybe, only a specific team should have access to the existing views, now we can achieve it through security roles.
This feature is governed by the EnableRoleBasedSystemViews property, which we can manage through the OrganizationSettingsEditor tool.
Download and install the managed solution.
https://github.com/seanmcne/OrgDbOrgSettings/releases


Before we set the property as true, let us apply security roles to some of our views.
To apply it, select the view in the PowerApps Maker Portal and click on View Settings.

From the View Settings window, we can choose Specific security roles to apply to the views. Here we have selected the Vice President of Sales role for the All Leads Views. Save and publish the change.

Here we have repeated the same steps for the below remaining views.

Now if we open the leads view as System Admin, we can see all the views. This is because we have not yet set the EnableRoleBasedSystemViews to true.

Now let us set the property as true.

As soon as we set the property as true, we can see the views getting filtered for the System Admin user.
Only the below public view is visible. (along with the 2 private views at the top)

Now if we assign the “Vice President of Sales” role to the same user, he can then see the views on which security roles were applied.

The user can still see the remaining views through the “Manage and share views” option.


The records that the user can see in the views are still governed by security privileges.
Although the documentation mentions, that this feature only filters views in the table list view selector and not in associated grids or subgrids, we can see the same filtering applied.
Below is the Lead Associated view in the Competitor table.

When we enable the EnableRoleBasedSystemViews setting using the OrganizationSettingsEditor tool, it takes effect immediately. All table views, except the default one, start getting filtered based on assigned security roles right away. Assigning security roles to a view is also effective immediately after we save and publish the view. However, if we change a view’s access from ‘Specify security roles’ to ‘Everyone’, it might take up to 24 hours for the change to fully apply across the system.
Get all the details here – Manage access to public system views (preview)
More Power to you…
Happy Learning…
Reference link: