Forum Discussion
Power BI Report Server with custom authentication error Power Bi Desktop
- 7 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.
Hi, thanks for the reply. I'll tell you what I did in the meantime. Reading around, I found a topic that suggested valuing customdata() and setting it in the SSAS connection string. That's what I did. In my case, I modified the connection string in PBIRS:
Data Source=localhost;Initial Catalog=TabularOrariOdooPowerUser;Cube=Modello;CUSTOMDATA={{USERID}}
Now, in the Power BI Desktop report, I've created a measure to verify whether the user "custom = CUSTOMDATA()" is actually captured. Running the report in PBIRS actually displays the user I'm logging in with, but I can't set this string as a filter in SSAS and, consequently, in the PBIRS report.
If I understand correctly, in your post, you suggested creating a mapping table that links custom usernames to the key and defines row-level security using a filter. To do this, I would need to create a hidden parameter that can't be modified and pass the user to it. I can try, thank you again for your support and I will definitely ask for your help again!!!
Thanks.