<?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 Power BI data set not refreshing. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-data-set-not-refreshing/m-p/739854#M19982</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have created an app over Azure and successfully fetched the access token. Now when I am using the C# code to refresh dataset in Power BI the function runs successfully without an error but still the dataset and report did not gets refresh. Please let me know if I am missing something. I am using SP online and Power BI web. Below is the code which I am using to refresh the data set.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; HttpWebRequest request;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var url = "&lt;A href="https://api.powerbi.com/v1.0/myorg/datasets/{0}/refreshes" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/datasets/{0}/refreshes&lt;/A&gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = System.Net.HttpWebRequest.CreateHttp(String.Format(url, datasetId));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //POST web request to create a datasource.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.KeepAlive = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Method = "POST";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.ContentLength = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Add token to the request header&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Headers.Add("Authorization", String.Format("Bearer {0}", token));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Write JSON byte[] into a Stream&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (Stream writer = request.GetRequestStream())&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var response = (HttpWebResponse)request.GetResponse();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("Dataset refresh request {0}", response.StatusCode.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2019 09:49:17 GMT</pubDate>
    <dc:creator>rajeshlohar2019</dc:creator>
    <dc:date>2019-07-15T09:49:17Z</dc:date>
    <item>
      <title>Power BI data set not refreshing.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-data-set-not-refreshing/m-p/739854#M19982</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have created an app over Azure and successfully fetched the access token. Now when I am using the C# code to refresh dataset in Power BI the function runs successfully without an error but still the dataset and report did not gets refresh. Please let me know if I am missing something. I am using SP online and Power BI web. Below is the code which I am using to refresh the data set.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; HttpWebRequest request;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var url = "&lt;A href="https://api.powerbi.com/v1.0/myorg/datasets/{0}/refreshes" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/datasets/{0}/refreshes&lt;/A&gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = System.Net.HttpWebRequest.CreateHttp(String.Format(url, datasetId));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //POST web request to create a datasource.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.KeepAlive = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Method = "POST";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.ContentLength = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Add token to the request header&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Headers.Add("Authorization", String.Format("Bearer {0}", token));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Write JSON byte[] into a Stream&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (Stream writer = request.GetRequestStream())&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var response = (HttpWebResponse)request.GetResponse();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("Dataset refresh request {0}", response.StatusCode.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 09:49:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-data-set-not-refreshing/m-p/739854#M19982</guid>
      <dc:creator>rajeshlohar2019</dc:creator>
      <dc:date>2019-07-15T09:49:17Z</dc:date>
    </item>
  </channel>
</rss>

