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,
You didn’t miss a config setting — this is a product limitation.
When Power BI Desktop saves/publishes to Power BI Report Server, it does a backend call to the Report Server REST API (for example GET /api/v2.0/ServiceState). That call only supports Integrated Windows authentication. With a Custom/Forms auth setup, the REST call returns 401, which is exactly what you’re seeing in the RSPortal logs.
So:
✅ Portal login (Logon.aspx) works
✅ Report Builder works (because it can prompt / handle credentials differently)
❌ Power BI Desktop publishing fails with “Unexpected error occurred” because Desktop can’t complete the REST authentication flow when the server is using custom forms auth (cookie-based).
What you can do
Use Windows Integrated authentication for PBIRS (supported path). If you must keep custom auth, you’ll likely need to revert/enable Windows auth for the report server endpoint used by Desktop.
Workaround: Save the PBIX locally, then upload it through the PBIRS web portal after logging in (if your portal allows uploading PBIX). This bypasses Desktop’s “Save to Report Server” authentication path.
Ensure you’re using Power BI Desktop (optimized for Report Server) that matches your PBIRS version, but note this won’t solve the custom-auth limitation — it’s just a compatibility requirement.
Bottom line
Power BI Desktop cannot publish to PBIRS using Custom/Forms authentication. The 401 on /api/v2.0/ServiceState confirms that Desktop is blocked by the authentication mode.