<?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 403 error when attempting to access REST API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/800801#M20880</link>
    <description>&lt;P&gt;Could someone please advise me where I may be going wrong here. I am attempting to create a sample dataset after retrieving what I believe to be a correct access token after prompting the end-user to login using the following URL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://login.windows.net/common/oauth2/authorize?response_type=code&amp;amp;client_id={client_app_id}&amp;amp;resource=https://analysis.windows.net/powerbi/api&amp;amp;redirect_uri={my_redirect_uri}&lt;/PRE&gt;&lt;P&gt;To create the sample dataset I used the following URL:&lt;/P&gt;&lt;PRE&gt;POST https://api.powerbi.com/v1.0/myorg/datasets&lt;/PRE&gt;&lt;P&gt;with the headers:&lt;/P&gt;&lt;PRE&gt;{
    "Authorization" =&amp;gt; "Bearer {auth_code}",
     "Content-Type" =&amp;gt; "application/json"
}&lt;/PRE&gt;&lt;P&gt;and the body:&lt;/P&gt;&lt;PRE&gt;"{\"name\":\"SalesMarketing\",\"tables\":[{\"name\":\"Product\",\"columns\":[{\"name\":\"ProductID\",\"dataType\":\"int\"},{\"name\":\"Manufacturer\",\"dataType\":\"string\"},{\"name\":\"Category\",\"dataType\":\"string\"},{\"name\":\"Segment\",\"dataType\":\"string\"},{\"name\":\"Product\",\"dataType\":\"string\"},{\"name\":\"IsCompete\",\"dataType\":\"bool\"}]}]}"&lt;/PRE&gt;&lt;P&gt;but when I send the request, all I receive is a 403 error with no message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;BR /&gt;Carl&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2019 13:48:45 GMT</pubDate>
    <dc:creator>cgreenwood</dc:creator>
    <dc:date>2019-09-24T13:48:45Z</dc:date>
    <item>
      <title>403 error when attempting to access REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/800801#M20880</link>
      <description>&lt;P&gt;Could someone please advise me where I may be going wrong here. I am attempting to create a sample dataset after retrieving what I believe to be a correct access token after prompting the end-user to login using the following URL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://login.windows.net/common/oauth2/authorize?response_type=code&amp;amp;client_id={client_app_id}&amp;amp;resource=https://analysis.windows.net/powerbi/api&amp;amp;redirect_uri={my_redirect_uri}&lt;/PRE&gt;&lt;P&gt;To create the sample dataset I used the following URL:&lt;/P&gt;&lt;PRE&gt;POST https://api.powerbi.com/v1.0/myorg/datasets&lt;/PRE&gt;&lt;P&gt;with the headers:&lt;/P&gt;&lt;PRE&gt;{
    "Authorization" =&amp;gt; "Bearer {auth_code}",
     "Content-Type" =&amp;gt; "application/json"
}&lt;/PRE&gt;&lt;P&gt;and the body:&lt;/P&gt;&lt;PRE&gt;"{\"name\":\"SalesMarketing\",\"tables\":[{\"name\":\"Product\",\"columns\":[{\"name\":\"ProductID\",\"dataType\":\"int\"},{\"name\":\"Manufacturer\",\"dataType\":\"string\"},{\"name\":\"Category\",\"dataType\":\"string\"},{\"name\":\"Segment\",\"dataType\":\"string\"},{\"name\":\"Product\",\"dataType\":\"string\"},{\"name\":\"IsCompete\",\"dataType\":\"bool\"}]}]}"&lt;/PRE&gt;&lt;P&gt;but when I send the request, all I receive is a 403 error with no message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;BR /&gt;Carl&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 13:48:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/800801#M20880</guid>
      <dc:creator>cgreenwood</dc:creator>
      <dc:date>2019-09-24T13:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: 403 error when attempting to access REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/801529#M20889</link>
      <description>&lt;P&gt;I think you are using the SPN approach, where SPN doesn't have access to &lt;STRONG&gt;Myworkspace.&amp;nbsp;&lt;/STRONG&gt;So basically you have use the legacy autentication (username and password)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Basically I'm making a request (post) on:&lt;/STRONG&gt;&lt;BR /&gt;&lt;A title="" href="https://login.windows.net/common/oauth2/token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://login.windows.net/common/oauth2/token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the Body parameters:&lt;BR /&gt;grant_type = password&lt;BR /&gt;scope = openid&lt;BR /&gt;resource = https: //analysis.windows.net/powerbi/api&lt;BR /&gt;client_id = MY_CLIENT_IS&lt;BR /&gt;username = MY_USER_NAME&lt;BR /&gt;password = MY_PASSWORD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/185923iCF9D672871D0E639/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 07:09:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/801529#M20889</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-09-25T07:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: 403 error when attempting to access REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/801874#M20893</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100012"&gt;@Jayendran&lt;/a&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I don't believe I am able to use this endpoint as my organisation has enabled two-factor authentication unless you're aware of a way to bypass it for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the error I received:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"error": "interaction_required",
    "error_description": "AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000009-0000-0000-c000-000000000000'.\r\nTrace ID: 83cc52bf-55e5-473e-9c83-92ac9b622200\r\nCorrelation ID: add98fba-18cb-4759-9fa4-f3526aa7341b\r\nTimestamp: 2019-09-25 12:33:35Z",
    "error_codes": [
        50076
    ],&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 12:36:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/801874#M20893</guid>
      <dc:creator>cgreenwood</dc:creator>
      <dc:date>2019-09-25T12:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: 403 error when attempting to access REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/801994#M20894</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/173545"&gt;@cgreenwood&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think you can bypass the MFA ,you have to disable the MFA to work this legacy approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another workaround will be use the same approach you have, but instead of publishing this to &lt;STRONG&gt;Myworkspace &lt;/STRONG&gt;try in a different worksapce, like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://api.PowerBI.com/v1.0/myorg/groups/{group_id}/datasets&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And make sure that SPN have Admin access to that workspace&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 14:21:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/801994#M20894</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-09-25T14:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: 403 error when attempting to access REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/1397217#M25904</link>
      <description>&lt;P&gt;Hi, Jayendran,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have send a post request that follow up your screenshot but I get an error:"&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The&amp;nbsp;'resource'&amp;nbsp;request&amp;nbsp;parameter&amp;nbsp;is&amp;nbsp;not&amp;nbsp;supported"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is this method still applicable at present?&lt;/DIV&gt;&lt;DIV&gt;It would be great if you can verify it again.&lt;/DIV&gt;&lt;DIV&gt;Thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Detail:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"invalid_request"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"error_description"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"AADSTS901002:&amp;nbsp;The&amp;nbsp;'resource'&amp;nbsp;request&amp;nbsp;parameter&amp;nbsp;is&amp;nbsp;not&amp;nbsp;supported.\r\nTrace&amp;nbsp;ID:&amp;nbsp;7f822b02-76ad-4ff4-a4b5-74ae40fc4322\r\nCorrelation&amp;nbsp;ID:&amp;nbsp;eec15cee-81d4-4b73-b067-a524d37c245w\r\nTimestamp:&amp;nbsp;2020-09-27&amp;nbsp;02:28:25Z"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"error_codes"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;901002&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"timestamp"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"2020-09-27&amp;nbsp;02:28:25Z"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"trace_id"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"7f822b02-76ad-4ff4-a4b5-74ae40fc4322"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"correlation_id"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"eec15cee-81d4-4b73-b067-a524d37c245w"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 27 Sep 2020 02:35:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/403-error-when-attempting-to-access-REST-API/m-p/1397217#M25904</guid>
      <dc:creator>apm_user_mart</dc:creator>
      <dc:date>2020-09-27T02:35:17Z</dc:date>
    </item>
  </channel>
</rss>

