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
jmoore11
Regular Visitor

Creating Scorecard via Rest Api does not return Dataset right away

Hello,

 

I am able to create a scorecard using the Microsoft.PowerBI.Api version 4.18.0 nuget package in a c# application. The response returned from Scorecards.PostWithHttpMessagesAsync does not initially have datasetId populated. I have to wait a couple of seconds and then preform a Scorecards.GetByIDAsync call. This is less than ideal as I would like to store the datasetId for future use.

Here is an example of my code:

jmoore11_0-1708615383828.png


I have put a breakpoint after the create, waiting a couple of seconds and then ran the following code and the datasetId is populated.

jmoore11_1-1708615432481.png


Is there anything I can do to ensure a datasetId is present on the first call and not do some sort of offloaded process and or thread sleep?

 

1 REPLY 1
Anonymous
Not applicable

Hi @jmoore11 ,

 

As far as I know, Rest API for Score Card is a preview feature in Power BI.

I suggest you to refer to this offical blog to learn more details.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.