Forum Discussion
401 Unauthorized error in querydata request when embedding dashboard with RLS
- 9 months ago
Hi alexrp02
Thank you for contacting the Microsoft Fabric Community Forum.
The 401 Unauthorized error on the querydata request usually occurs because the dashboard embed token does not include permissions for all underlying datasets referenced by the tiles. While the dashboard itself renders with the token, tile-level queries require explicit dataset access and correct RLS identity mapping.
To resolve this issue, ensure that all dataset IDs used by the dashboard tiles are included in the datasets property when generating the embed token. Additionally, define the appropriate identities for each dataset to correctly enforce RLS. It is also important to verify that the token’s scope is set to accessLevel: View and that its lifetime remains valid while the tiles are loading. Lastly, confirm that your embedding page is served over HTTPS and that your domain is listed under the allowed origins in the Power BI tenant settings.
For further details, please consult the official Microsoft documentation on
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-core
https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security
I hope this information is helpful. If you have any further questions, please let us know. we can assist you further.
Regards,
Microsoft Fabric Community Support Team.
Hi alexrp02
I wanted to check if you’ve had a chance to review the information provided. If you have any further questions, please let us know. Has your issue been resolved? If not, please share more details so we can assist you further.
Thank You.