Forum Discussion
Power BI Report Server with custom authentication error Power Bi Desktop
- 6 months ago
Hi fabio78,
You’ve used the correct and reliable approach for integrating Power BI Report Server with Custom Authentication and SSAS. By adding CUSTOMDATA={{USERID}} to the PBIRS connection string and referencing it in an SSAS role, you successfully recreate the user context that PBIRS doesn’t provide in Forms mode. Your setup works as intended: the Custom DLL sets the user identity, PBIRS forwards it via CUSTOMDATA, and SSAS applies Row-Level Security through DAX. This method is supported for per-user filtering when EffectiveUserName isn’t available.
Your architecture is solid: PBIRS operates in Custom Authentication mode, the report sends the custom identity in the connection string, and SSAS handles security in the role. This ensures that all security is managed within the semantic layer, not the report. The results you’re seeing, admins having full access and other users being filtered are expected.
To expand this to groups, modify your DLL to capture user groups and pass a normalized value into CUSTOMDATA, such as a group key or list. Then, add a group-to-business key mapping table in your Tabular model and adjust your role DAX to filter using CUSTOMDATA(). This approach keeps authorization logic in SSAS, maintains your custom identity throughout, and avoids unsupported changes in PBIRS.
Thank you.
Very good, have you tried adding users within the pbirs portal and granting different viewing rights to check the security of the folders?
Hi Fabio,
Yes, I also configured the PBIRS portal security based on the Microsoft CustomSecuritySample.
According to the documentation:
https://github.com/microsoft/Reporting-Services/blob/master/CustomSecuritySample/README.md
I defined one user as the administrator in RSReportServer.config:
<Security>
<Extension Name="Forms" Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization, Microsoft.Samples.ReportingServices.CustomSecurity">
<Configuration>
<AdminConfiguration>
<UserName>AdminUser</UserName>
</AdminConfiguration>
</Configuration>
</Extension>
</Security>
This user is recognized as a PBIRS administrator after login and has full access to the portal.
Using this admin account, I:
- Added other users in the PBIRS Portal
- Assigned them appropriate roles and permissions
- Configured folder and report-level access
With this setup:
- Portal security (folders/reports) works correctly
- Users can only see the content they are authorized for
So currently both PBIRS authorization and SSAS RLS (via CUSTOMDATA) are working properly.
Thanks again for your support.
Best regards