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 expected behavior when you're using Single Sign-On (SSO).
When SSO is enabled (e.g., via Azure AD), Power BI uses the identity of the currently signed-in user to connect to the data source. That means you can’t simulate another role/user using the "View as role" feature — because you're always authenticated as yourself through SSO.
If you just want to test your RLS roles, you have two main options:
-
Temporarily disable SSO for the data source in the dataset settings. That way, you can use “View as role” without identity conflicts. Just don’t forget to re-enable it after testing.
-
Test using a real user account that has the role assigned, and access the report through the service with SSO active. It’s more work but gives you the full end-to-end validation.
Unfortunately, “Test as role” simply doesn’t work with SSO on — by design.
If this post helps, then please consider Accepting it as the solution and giving Kudos to help the other members find it more quickly