<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Creating Scorecard via Rest Api does not return Dataset right away in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Creating-Scorecard-via-Rest-Api-does-not-return-Dataset-right/m-p/3717559#M49704</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am able to create a scorecard using the&amp;nbsp;Microsoft.PowerBI.Api version 4.18.0 nuget package in a c# application. The response returned from&amp;nbsp;Scorecards.PostWithHttpMessagesAsync does not initially have datasetId populated. I have to wait a couple of seconds and then preform a&amp;nbsp;Scorecards.GetByIDAsync call. This is less than ideal as I would like to store the datasetId for future use.&lt;BR /&gt;&lt;BR /&gt;Here is an example of my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmoore11_0-1708615383828.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1047600iD4A87BF8169365EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmoore11_0-1708615383828.png" alt="jmoore11_0-1708615383828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have put a breakpoint after the create, waiting a couple of seconds and then ran the following code and the datasetId is populated.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmoore11_1-1708615432481.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1047601iCB32C4B1E16C5C37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmoore11_1-1708615432481.png" alt="jmoore11_1-1708615432481.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 15:24:29 GMT</pubDate>
    <dc:creator>jmoore11</dc:creator>
    <dc:date>2024-02-22T15:24:29Z</dc:date>
    <item>
      <title>Creating Scorecard via Rest Api does not return Dataset right away</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-Scorecard-via-Rest-Api-does-not-return-Dataset-right/m-p/3717559#M49704</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am able to create a scorecard using the&amp;nbsp;Microsoft.PowerBI.Api version 4.18.0 nuget package in a c# application. The response returned from&amp;nbsp;Scorecards.PostWithHttpMessagesAsync does not initially have datasetId populated. I have to wait a couple of seconds and then preform a&amp;nbsp;Scorecards.GetByIDAsync call. This is less than ideal as I would like to store the datasetId for future use.&lt;BR /&gt;&lt;BR /&gt;Here is an example of my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmoore11_0-1708615383828.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1047600iD4A87BF8169365EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmoore11_0-1708615383828.png" alt="jmoore11_0-1708615383828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have put a breakpoint after the create, waiting a couple of seconds and then ran the following code and the datasetId is populated.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmoore11_1-1708615432481.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1047601iCB32C4B1E16C5C37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmoore11_1-1708615432481.png" alt="jmoore11_1-1708615432481.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 15:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-Scorecard-via-Rest-Api-does-not-return-Dataset-right/m-p/3717559#M49704</guid>
      <dc:creator>jmoore11</dc:creator>
      <dc:date>2024-02-22T15:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Scorecard via Rest Api does not return Dataset right away</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-Scorecard-via-Rest-Api-does-not-return-Dataset-right/m-p/3718995#M49724</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/694782"&gt;@jmoore11&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I know, Rest API for Score Card is a preview feature in Power BI.&lt;/P&gt;
&lt;P&gt;I suggest you to refer to this&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/scorecards_(preview)" target="_self"&gt; offical blog&lt;/A&gt; to learn more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 06:50:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-Scorecard-via-Rest-Api-does-not-return-Dataset-right/m-p/3718995#M49724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-23T06:50:46Z</dc:date>
    </item>
  </channel>
</rss>

