Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
alexrp02
New Member

401 Unauthorized error in querydata request when embedding dashboard with RLS

Hi, we are embedding a dashboard whose reports are associated to a dataset with RLS in our web.

For generating the embed token, we have to set the identities. Embedding those reports works totally fine (even if they are paginated). The dashboard embed token generation works fine and the dashboard displays in our page, but the tiles keep infinite loading:

 

screenshot.png

The issue comes from a request to 

https://wabi-west-europe-e-primary-redirect.analysis.windows.net/explore/querydata?synchronous=true

 that is returning a 401.

screenshot2.png

I need some help, as the token is generated correctly and if the identities or permissions were wrong I suppose that the GenerateToken request would fail.

 

All the data from the reports comes from a semantic model (that as I have said before has RLS) that is connected to delta table in a Lakehouse.

1 ACCEPTED SOLUTION
v-karpurapud
Community Support
Community Support

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-co...
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.

View solution in original post

4 REPLIES 4
v-karpurapud
Community Support
Community Support

Hi @alexrp02 

We have not received a response from you regarding the query and were following up to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

 

Thank You.

 

Nabha-Ahmed
Memorable Member
Memorable Member

Hi @alexrp02 

 

 I had a similar issue where embedded dashboard tiles hung and returned a 401 on a querydata request, even though the embed token seemed fine.

The fix was to include all underlying dataset IDs in the embed token’s datasets array and supply proper identities(with RLS roles) for each dataset.

Once I refreshed the embed token generation logic to include those datasets + identities, the tiles started rendering properly.

Hope this helps you .

v-karpurapud
Community Support
Community Support

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.

v-karpurapud
Community Support
Community Support

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-co...
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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.