The problem involves all three focus areas: web resource security privileges, dashboard script references, and role-based access control interaction.
First, web resource security privileges need to be checked at multiple levels. Beyond the Web Resource entity read access, verify that the Sales Representative role has access to any dependent web resources your visualization script references (libraries, CSS files, etc.). Go to Settings > Customizations > Customize the System > Web Resources, find your visualization script, and check Dependencies. Each dependency must be readable by the role.
For dashboard script references, the issue is likely in how the dashboard XML references the web resource. System dashboards in D365 9.1 cache web resource references based on the security context at load time. After role-based access control changes, this cache can become stale. Solution:
- Export the dashboard as a solution
- Edit the customizations.xml file and increment the web resource version
- Reimport and publish
This forces D365 to rebuild the security context for dashboard script references.
The role-based access control aspect is more subtle. Your visualization likely queries data using a specific security context. When you restructured roles, you may have inadvertently removed access to:
- Saved views that the visualization uses as data sources
- Custom entities or relationships the script traverses
- System views that are now restricted by the role hierarchy
To diagnose: Open the browser console while logged in as a Sales Rep, manually execute the data query your visualization uses (via Xrm.WebApi.retrieveMultipleRecords), and check for access denied errors. You’ll likely find a specific entity, view, or field that’s now restricted.
Most common fix: Sales Representatives need Read access to System Views (savedquery entity) if your visualization references system views. Check Security Roles > Core Records > View and enable Read for the Sales Representative role. This is often overlooked when implementing role-based access control.
Finally, verify field-level security profiles. If any fields in your visualization query have field security enabled, Sales Reps must be included in a field security profile that grants Read access to those fields, or the query returns null values that break the chart rendering.
This draft is based on general Microsoft Dynamics 365 Sales knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.