Forum Discussion
Test as role does not work with Single Sign-On (SSO)
- 1 year ago
Hi nn6484,
Thank you for reaching out to the Microsoft fabric community forum. Also Ritaf1983, for his inputs on this thread. I have identified few workarounds that may help resolve the issue.
The error message "Test as role does not work with Single Sign-On (SSO)" is expected when the dataset is configured to use SSO authentication, such as Azure AD SSO via Direct Query or Live Connection. In these scenarios, the “Test as role” feature is not supported because Power BI cannot impersonate user roles when SSO is active, as user identity is delegated to the data source during query execution.
Test RLS in Power BI Desktop: This is the most reliable approach for validating Row-Level Security roles:- Open your .pbix file in Power BI Desktop.
- Go to Modelling > Manage Roles to review or define roles.
- Use “View as Roles” to simulate how data will appear for users in each role.
- Once verified, publish the report to the Power BI Service.
Test in the Service Using Real Users: You can assign users to roles in the Power BI Service:
- In the dataset’s security settings, assign users to their appropriate roles.
- Share the report with test users and have them access it directly.
- This will reflect the data as filtered by their assigned role and works with SSO.
Kindly please look into below mentioned image:
Kindly refer to the below following links for better understanding:
Test single sign-on (SSO) configuration - Power BI | Microsoft Learn
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
Kindly refer to the below solved solution for better understanding:
Solved: Re: Test as role does not work with Single Sign-On... - Microsoft Fabric Community
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.Thank you for using Microsoft Community Forum.
Hi nn6484 ,
This is actually a known limitation in Power BI — when Single Sign-On (SSO) is enabled, the Test as role feature doesn’t work.
Here’s why:
SSO forces Power BI to always use the real, authenticated user’s identity when connecting to the data source. That means it can’t simulate another role or user, which is exactly what “Test as role” tries to do.
What you can do:
- If you need to test Row-Level Security (RLS), try doing it in Power BI Desktop instead. It works fine there.
- Alternatively, publish the report and ask a user assigned to the role to validate the data visibility.
- If you're using an on-premises data source, make sure your gateway is configured for SSO, but keep in mind that testing roles still won’t work in the Service with SSO on.
More info here: Row-level security (RLS) with Power BI
Hope this clears things up!
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI