<?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: Power BI Python API Access 2022 in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707695#M37954</link>
    <description>&lt;P&gt;Thanks. Yea, I guess I just don't understand how the scopes work. Have granted the app registration the API permissions and aquired the token with the app registrations ClientID and Secret. I would think that it would get the correct scopes.&lt;/P&gt;&lt;P&gt;Only thing that I can think of is that the user delegation is missing. Will keep hunting I guess.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 18:47:56 GMT</pubDate>
    <dc:creator>luskbo</dc:creator>
    <dc:date>2022-08-17T18:47:56Z</dc:date>
    <item>
      <title>Power BI Python API Access 2022</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2696181#M37844</link>
      <description>&lt;P&gt;Having trouble authenticating to Power BI via API. Uusually pretty good at finding some help online, but there are many different explanations on how to do this, and alot of them are historic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My setup and testing so far:&lt;/P&gt;&lt;P&gt;I have an app registration, setup with delegated permissions. ( Likely too may permissions ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-08-11 at 3.35.22 PM.png" style="width: 887px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/764191iC3AD78057667B91B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-11 at 3.35.22 PM.png" alt="Screen Shot 2022-08-11 at 3.35.22 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm able to get an access token by authenticating with client id and secret, by using the .default scope.&lt;/P&gt;&lt;P&gt;( Maybe the wrong scope and grant type here, but only way I can get a token).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-08-11 at 3.38.50 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/764199iCD48CD3C901C1611/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-11 at 3.38.50 PM.png" alt="Screen Shot 2022-08-11 at 3.38.50 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From here, I attempted to use this token to make a POST request to the Power BI EndPoint.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, I only ever get a 403. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found another post on this forum where another user had this same issue, but seems either outdated or not applicible to what I am trying to do.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Access-Power-BI-API-with-Python/m-p/189165#M6015" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Developer/Access-Power-BI-API-with-Python/m-p/189165#M6015&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any ideas on what I'm doing wrong here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 21:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2696181#M37844</guid>
      <dc:creator>luskbo</dc:creator>
      <dc:date>2022-08-11T21:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Python API Access 2022</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2698209#M37862</link>
      <description>&lt;P&gt;Check your token at jwt.io&amp;nbsp; - most likely it has the wrong or insufficient scope.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 21:01:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2698209#M37862</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-12T21:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Python API Access 2022</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707460#M37951</link>
      <description>&lt;P&gt;Thanks for the reply. I did check, and noticed that the decoded token doens't contains any scopes.&lt;BR /&gt;When I request the token, I have been using .default. Do you know if this may be the problem?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 16:56:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707460#M37951</guid>
      <dc:creator>luskbo</dc:creator>
      <dc:date>2022-08-17T16:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Python API Access 2022</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707495#M37953</link>
      <description>&lt;P&gt;Yes, that is the issue.&amp;nbsp; If you get a token via a different process (powershell for example) and examine it you will see it has all the scopes, and it works.&amp;nbsp; No scope = no work.&amp;nbsp; The .default thing fails somewhere but I don't understand where. Nobody was able to explain that to me yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 17:09:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707495#M37953</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-17T17:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Python API Access 2022</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707695#M37954</link>
      <description>&lt;P&gt;Thanks. Yea, I guess I just don't understand how the scopes work. Have granted the app registration the API permissions and aquired the token with the app registrations ClientID and Secret. I would think that it would get the correct scopes.&lt;/P&gt;&lt;P&gt;Only thing that I can think of is that the user delegation is missing. Will keep hunting I guess.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 18:47:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Python-API-Access-2022/m-p/2707695#M37954</guid>
      <dc:creator>luskbo</dc:creator>
      <dc:date>2022-08-17T18:47:56Z</dc:date>
    </item>
  </channel>
</rss>

