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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Power BI send “invalid status code 'Bad Request'” for a cached DatasetId

I am currently working on an issue regards embedding power bi report in our platform. I should say that I am a newbie in Power BI and I have tried to read about the relation between a report, group, and dataset. My problem is related to caching report, datasetId and dataset belong to that report.

Implemented caching?

The current implementation, on one side, caches a report by getting reports after calling client.Reports.GetReportsInGroupAsync. And each time try to get the report by its name as the key. However, on the other side, to get the value of dataSets.IsEffectiveIdentityRequired, it caches the dataset. And each time after getting the report searches in the cache for that dataset to be able to assign IsEffectiveIdentityRequired.

My problem is I get Operation returned an invalid status code 'Bad Request' exception from Power BI API method client.Datasets.GetDatasetByIdInGroupAsync(GroupId, dataSetId) sometimes and my assumption is that they should update the dataset in power bi.

I have tried to find out the answer to these two questions, but I can not find a clear answer 1. What is the relation between Report and DatasetId? Because inside the Report model we have a datasetId, therefore I suppose that one report should be based on one unique dataset. 2. When we update a report, what happens to a datasetId? I get that exception, which means that datasetId is not valid anymore.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

1 REPLY 1
Anonymous
Not applicable

I got my answer through another forum, https://stackoverflow.com/a/54416182/2688419

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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