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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

PowerBI GetDatasetByID returns 403

I get 403 forbidden whenever I try to get DatasetInfo using
var dataset = pbiClient.Datasets.GetDatasetByIdAsync(report.DatasetId);

 

but when I include the GroupId in returns data successffuly

var datasetx = await pbiClient.Datasets.GetDatasetByIdInGroupAsync("xxxx-xxxx", report.DatasetId)

1 ACCEPTED SOLUTION
nickyvv
Most Valuable Professional
Most Valuable Professional

@Anonymous There's a slight difference between the two methods:

  • The first returns a dataset in My Workspace.
  • The latter returns a dataset in the workspace with GUID <xxxx-xxxx>

So if report.DatasetId does not exist in My Workspace you get that error.

 

Did this help you or did I answer your question?
Then please give kudos or mark my post as a solution!
My blog: nickyvv.com
Twitter: @NickyvV

 



Did I answer your question? Mark my post as a solution!

Blog: nickyvv.com | @NickyvV


View solution in original post

1 REPLY 1
nickyvv
Most Valuable Professional
Most Valuable Professional

@Anonymous There's a slight difference between the two methods:

  • The first returns a dataset in My Workspace.
  • The latter returns a dataset in the workspace with GUID <xxxx-xxxx>

So if report.DatasetId does not exist in My Workspace you get that error.

 

Did this help you or did I answer your question?
Then please give kudos or mark my post as a solution!
My blog: nickyvv.com
Twitter: @NickyvV

 



Did I answer your question? Mark my post as a solution!

Blog: nickyvv.com | @NickyvV


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.