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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JAnder
Helper I
Helper I

Embedded reports work but having a problem if the report re-uses a datasource

Currently I have embedded reporting working for both single page and paginated reports. If the report is created with its own dataset everything works fine. When I call `client.Reports.GetReportsAsync` it returns the report, datasetId, embed URL, report Id etc and all is well. 

 

If however a report has been created using a dataset already existing on app.powerbi.com, the report is still returned but it is missing the datasetId. This this causes the embedded report to hang at loading for a long time before finally showing "An unexpected error" and saying the session cannot be found or expired. I should add that viewing the report direct in the browser works, this is only a problem when it is embedded.

 

If I call `client.Reports.GetDatasourcesInGroupAsync` I can get the datasource info, connection details etc and it shows the datasource type as AnalysisServices. So there doesn't seem to be a permissions issue there.

 

Is there some way to use these reports embedded and connect them with the correct datasource. I am currently using V2 client. I can call `client.EmbedReport` no problem and get the token. It just seems to be this missing datasetId causing the problem.

 

Thanks

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @JAnder ,

Could you please share the screenshot of the corresponding error when you embed the report created using Power BI dataset? Here is a case with similar problem as yours, please check the solution in it, hope it can help you.

Your Power BI Session Expired message

Apparently it's actually a permission problem. I created the dashboard in my designated workspace (not My Workspace). In that workspace, I just knew that only certain users have the access and User A is not in it. So I published the report again (this time in My Workspace), and shared the report with User A. It works just fine after that. Also make sure the user has a Pro version.


Best Regards

Hi @Anonymous 

JAnder_1-1631173494038.png

 

 

It looks to be a permissions issue. While its sitting there claiming to load, I can see it calling the same 2 Urls over and over. The parameters one shown below with Guids redacted also returns some JSON showing unauthorised

 

{"ErrorCode":"Unauthorized_User","Message":"","Target":"User","StatusCode":401,"Culprit":1}

 

https://<redacted>.pbidedicated.windows.net/webapi/capacities/<redacted>/workloads/RsRdlEngine/rs/automatic/v1.0/session/<redacted>/parameters

 

The dataset is on the same workspace as the report. I can access both through power BI just not through embedded. I am still investigating but happy to hear ideas.

 

Thanks

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.