Power BI 组级行级安全(RLS)失效问题求助
Let’s walk through the most common reasons your row-level security (RLS) rule isn’t restricting data to Italy for myuser@mytenant.com when embedded in SharePoint, and how to fix them:
Check if the user has elevated permissions in Power BI Service
RLS doesn’t apply to users with dataset edit permissions, workspace admin rights, or Power BI admin roles. Double-check the dataset’s Security tab: ensuremyuser@mytenant.comis only assigned to your Italy-specific role, and they don’t have any higher-level access to the workspace or dataset.Verify the embedding method uses organizational permissions
When embedding in SharePoint, make sure you selected "Embed for your organization" (not public embedding) and chose "Use existing permissions" during the embed setup. Public embedding skips user authentication entirely, so RLS rules won’t trigger. Using existing permissions ensures Power BI checks the user’s RLS role before serving data.Refresh the dataset and clear cache
Power BI Service might be serving cached data that doesn’t reflect your latest RLS settings. Manually refresh the dataset in Power BI Service, then have the user clear their browser cache or open the SharePoint page in incognito mode to load fresh data.Validate your RLS rule syntax and scope
Head back to Power BI Desktop’sManage Rolesand confirm:- The rule is applied to the correct table (e.g., your fact or dimension table with the
regionfield) - The syntax is correct:
region = "Italy"(use English quotes, and ensure case matches your data—some databases are case-sensitive!) - No conflicting rules are overriding this one (e.g., another role assigned to the user that allows broader access)
- The rule is applied to the correct table (e.g., your fact or dimension table with the
Test RLS directly in Power BI Service first
Havemyuser@mytenant.comopen the report directly in Power BI Service (not via SharePoint). If they still see all data here, the problem is with your RLS configuration, not the embedding. If direct access works correctly, the issue lies in how SharePoint is passing user identity to Power BI.Check SharePoint embed settings
Ensure the SharePoint page’s embedded report doesn’t have "Allow anonymous access" enabled, and that you’re embedding the actual report (not a dashboard tile that links to an unrestricted view of the dataset).
By working through these steps, you should be able to pinpoint why RLS isn’t enforcing in the embedded view.
内容的提问来源于stack exchange,提问作者Nelson Gomes Matias

