<?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 Re: Acquired token gives 401 Unauthorized when trying to create DataSet in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1609722#M27354</link>
    <description>&lt;P&gt;I am facing same issues.&amp;nbsp; Could you please explain the solution? I dont understand how App registration can become a service principal? which service group should that be added to?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 00:47:55 GMT</pubDate>
    <dc:creator>visuresh</dc:creator>
    <dc:date>2021-01-20T00:47:55Z</dc:date>
    <item>
      <title>Acquired token gives 401 Unauthorized when trying to create DataSet</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/916154#M22147</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;im building an app to push data to a dataset in Power Bi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the token i got from azure does not seam to have te persissions i gave til ap in "app registrations"&lt;/P&gt;&lt;P&gt;the code om using to a&lt;SPAN&gt;cquire the token&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;string&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;resourceUri&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;"https://analysis.windows.net/powerbi/api"&lt;/SPAN&gt;;
&lt;SPAN&gt;string&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;authorityUri&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;"https://login.windows.net/common/"&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;SPAN&gt;AuthenticationContext&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;authenticationContext&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;AuthenticationContext&lt;/SPAN&gt;(&lt;SPAN&gt;authorityUri&lt;/SPAN&gt;);
&lt;SPAN&gt;var&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;AuthResult&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;authenticationContext&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AcquireTokenAsync&lt;/SPAN&gt;(&lt;SPAN&gt;resourceUri&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;ClientCredential&lt;/SPAN&gt;(&lt;SPAN&gt;ClientID&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;AppSecret&lt;/SPAN&gt;))&lt;SPAN&gt;.&lt;/SPAN&gt;Result;
 
&lt;SPAN&gt;return&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;AuthResult&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;AccessToken;&lt;/PRE&gt;&lt;P&gt;and the permissions that is grated in azure ad&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pbi.png" style="width: 593px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/230450iC920E2516ADEF530/image-size/large?v=v2&amp;amp;px=999" role="button" title="pbi.png" alt="pbi.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but when i try to create the dataset it gives me an 401&lt;/P&gt;&lt;P&gt;i can create the dataset when i generate the token for a user with powershell but not with the token generated from client_id and client_secret&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you can help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 08:41:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/916154#M22147</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-30T08:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Acquired token gives 401 Unauthorized when trying to create DataSet</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/917577#M22174</link>
      <description>&lt;P&gt;Solved it myself&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;App registration (&lt;SPAN&gt;service principal&lt;/SPAN&gt;) needs to be a member of a Security group&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 08:50:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/917577#M22174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-31T08:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Acquired token gives 401 Unauthorized when trying to create DataSet</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1021123#M23069</link>
      <description>&lt;P&gt;Can you tell me, how exactly you have added the application security group.&lt;/P&gt;&lt;P&gt;In Roles and administrator i have added the below role, But still i am getting the error.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ad.JPG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/255321iB7CB8815772828FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="ad.JPG" alt="ad.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AD1.JPG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/255322i84FB3F5AB0772543/image-size/large?v=v2&amp;amp;px=999" role="button" title="AD1.JPG" alt="AD1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 07:34:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1021123#M23069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-12T07:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Acquired token gives 401 Unauthorized when trying to create DataSet</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1232586#M24820</link>
      <description>&lt;P&gt;Can you please explian or direct how the service principal added to security group&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 15:24:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1232586#M24820</guid>
      <dc:creator>anjanarja</dc:creator>
      <dc:date>2020-07-18T15:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Acquired token gives 401 Unauthorized when trying to create DataSet</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1609722#M27354</link>
      <description>&lt;P&gt;I am facing same issues.&amp;nbsp; Could you please explain the solution? I dont understand how App registration can become a service principal? which service group should that be added to?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 00:47:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Acquired-token-gives-401-Unauthorized-when-trying-to-create/m-p/1609722#M27354</guid>
      <dc:creator>visuresh</dc:creator>
      <dc:date>2021-01-20T00:47:55Z</dc:date>
    </item>
  </channel>
</rss>

