<?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: Unauthorized response getting reports through groups endpoint of API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/304620#M8967</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47085"&gt;@pangelino&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I'm using the Power API REST API to first retrieve groups that the logged in user has access to, and then to retrieve reports within those groups.&amp;nbsp; I can successfully retrieve reports through the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/reports" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/reports&lt;/A&gt; endpoint, but if I make the request through the&amp;nbsp;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports&lt;/A&gt; endpoint with any of the retrieved group id's, I get a 401 - Unauthorized response.&amp;nbsp; I am sending the access token as an authorization header using the "Bearer {token}" format, the same as when I successfully retrieve reports independent of the group id.&amp;nbsp; Can anyone suggest what the problem is here?&amp;nbsp; Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47085"&gt;@pangelino&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Is the registered app with sufficient permissions? You can check the permission in &lt;A href="https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview" target="_self"&gt;Azure portal&lt;/A&gt;-&amp;gt;Active Directory-&amp;gt;App registrations. The delegated perssions count shall be 14.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/69867iD462597FCFF349A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your account a member of the workspace group?&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2017 09:14:04 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-11-16T09:14:04Z</dc:date>
    <item>
      <title>Unauthorized response getting reports through groups endpoint of API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/304256#M8953</link>
      <description>&lt;P&gt;I'm using the Power API REST API to first retrieve groups that the logged in user has access to, and then to retrieve reports within those groups.&amp;nbsp; I can successfully retrieve reports through the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/reports" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/reports&lt;/A&gt; endpoint, but if I make the request through the&amp;nbsp;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports&lt;/A&gt; endpoint with any of the retrieved group id's, I get a 401 - Unauthorized response.&amp;nbsp; I am sending the access token as an authorization header using the "Bearer {token}" format, the same as when I successfully retrieve reports independent of the group id.&amp;nbsp; Can anyone suggest what the problem is here?&amp;nbsp; Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 23:28:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/304256#M8953</guid>
      <dc:creator>pangelino</dc:creator>
      <dc:date>2017-11-15T23:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized response getting reports through groups endpoint of API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/304620#M8967</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47085"&gt;@pangelino&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I'm using the Power API REST API to first retrieve groups that the logged in user has access to, and then to retrieve reports within those groups.&amp;nbsp; I can successfully retrieve reports through the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/reports" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/reports&lt;/A&gt; endpoint, but if I make the request through the&amp;nbsp;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{group_id}/reports&lt;/A&gt; endpoint with any of the retrieved group id's, I get a 401 - Unauthorized response.&amp;nbsp; I am sending the access token as an authorization header using the "Bearer {token}" format, the same as when I successfully retrieve reports independent of the group id.&amp;nbsp; Can anyone suggest what the problem is here?&amp;nbsp; Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47085"&gt;@pangelino&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Is the registered app with sufficient permissions? You can check the permission in &lt;A href="https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview" target="_self"&gt;Azure portal&lt;/A&gt;-&amp;gt;Active Directory-&amp;gt;App registrations. The delegated perssions count shall be 14.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/69867iD462597FCFF349A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your account a member of the workspace group?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 09:14:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/304620#M8967</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-11-16T09:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized response getting reports through groups endpoint of API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/305016#M8982</link>
      <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;.&amp;nbsp; I should have mentioned that when I log into powerbi.com with the same account that I use to test the application, I can navigate through "Workspaces" (groups in the API), and can see and execute reports within them.&amp;nbsp; My application seems to see all the same groups, but is unauthorized to request reports through the groups/{group_id}/reports endpoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added all the permissions you noted below, even including one Application Permissions that you do not call out.&amp;nbsp; My Azure permissions on the app registration now look like this, but I still get the same 401 Unauthoorized response:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-11-16 at 9.59.05 AM.png" style="width: 472px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/69938iF5BB1E60EBD6F03B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-11-16 at 9.59.05 AM.png" alt="Screen Shot 2017-11-16 at 9.59.05 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 17:00:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/305016#M8982</guid>
      <dc:creator>pangelino</dc:creator>
      <dc:date>2017-11-16T17:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized response getting reports through groups endpoint of API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/313962#M9286</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;I'm still stuck on this.&amp;nbsp; Would you recommend that I open a ticket with technical support on this?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 16:28:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/313962#M9286</guid>
      <dc:creator>pangelino</dc:creator>
      <dc:date>2017-11-29T16:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized response getting reports through groups endpoint of API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/317266#M9385</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/47085"&gt;@pangelino&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Is the groupid correct? Can you send the accesstoken in your case to me through a private message?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 07:35:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/317266#M9385</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-12-05T07:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized response getting reports through groups endpoint of API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/317709#M9394</link>
      <description>&lt;P&gt;Eric, in preparing to reply to you I finally discovered the problem.&amp;nbsp; In my C# code I was sending the HTTP request like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;HttpWebRequest request = CreatePowerBiApiRequest("groups/{groupId}/reports", accessToken);&lt;/PRE&gt;&lt;P&gt;What I realized today is that I forgot the $ at the beginning of the string so that the string interpolation would occur.&amp;nbsp; It should have been like this:&lt;/P&gt;&lt;PRE&gt;HttpWebRequest request = CreatePowerBiApiRequest($"groups/{groupId}/reports", accessToken);&lt;/PRE&gt;&lt;P&gt;So the request was just statically sending the string "{groupId}" in the request instead of substituting in the actual group ID value.&amp;nbsp; Totally my bad!&amp;nbsp;&lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:42:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-response-getting-reports-through-groups-endpoint-of/m-p/317709#M9394</guid>
      <dc:creator>pangelino</dc:creator>
      <dc:date>2017-12-05T17:42:58Z</dc:date>
    </item>
  </channel>
</rss>

