<?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 Permission Denied When Exporting and Downloading App in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2428327#M20143</link>
    <description>&lt;P&gt;I am attempting to set up an OAuth client that can be used to programmatically export and download an app from a shared space via the Qlik Cloud REST API.&lt;/P&gt;
&lt;P data-unlink="true"&gt;I am successfully able to run the export POST request, "https://&amp;lt;tenant&amp;gt;.&amp;lt;region&amp;gt;.qlikcloud.com/api/v1/apps/&amp;lt;appId&amp;gt;/export",&amp;nbsp;&amp;nbsp;and receive the location header specifying a temp-contents ID. However, when I try to get the file from temp-contents endpoint via GET "https://&amp;lt;tenant&amp;gt;.&amp;lt;region&amp;gt;.qlikcloud.com/api/v1/temp-contents/&amp;lt;id&amp;gt;", I receive a response with a "404 Not Found" status with the following body:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{
    "traceId": "a5075a43661a3dde6633722c7ed6e8b5",
    "errors": [
        {
            "code": "TCS-012",
            "title": "Unable to retrieve metadata",
            "detail": "Metadata can't be retrieved",
            "meta": {
                "locale": "en-US",
                "errorType": "Error",
                "sourceErrors": "permission denied"
            }
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;While it is returning a 404 error, the body's message suggests the client does not have sufficient permissions. I get the same error when trying the "/temp-contents/&amp;lt;id&amp;gt;/details" endpoint.&lt;/P&gt;
&lt;P&gt;The client has the 'Analyzer' entitlement with the 'Tenant Admin' role. It is of type 'Web', has the M2M option checked, and has the trusted consent method.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has access to the 'admin.apps:export' and 'admin.apps:read' scopes as well as the "Can view" and "Can edit" space permissions in the shared space that the app I'm trying to export resides.&amp;nbsp;I've also tried different combinations of space permissions and OAuth scopes to no avail.&lt;/P&gt;
&lt;P&gt;My testing workflow has been to retrieve a token via&amp;nbsp;"https://&amp;lt;tenant&amp;gt;.&amp;lt;region&amp;gt;.qlikcloud.com&lt;SPAN&gt;/oauth/token" with the previously mentioned scopes and use that to authenticate for the export and temp-contents requests.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Am I missing something here? Is there a way that I can debug and evaluate permissions for this, or view what's available in the temporary content service?&lt;/P&gt;
&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 14:31:14 GMT</pubDate>
    <dc:creator>Stentone</dc:creator>
    <dc:date>2024-03-07T14:31:14Z</dc:date>
    <item>
      <title>Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2428327#M20143</link>
      <description>&lt;P&gt;I am attempting to set up an OAuth client that can be used to programmatically export and download an app from a shared space via the Qlik Cloud REST API.&lt;/P&gt;
&lt;P data-unlink="true"&gt;I am successfully able to run the export POST request, "https://&amp;lt;tenant&amp;gt;.&amp;lt;region&amp;gt;.qlikcloud.com/api/v1/apps/&amp;lt;appId&amp;gt;/export",&amp;nbsp;&amp;nbsp;and receive the location header specifying a temp-contents ID. However, when I try to get the file from temp-contents endpoint via GET "https://&amp;lt;tenant&amp;gt;.&amp;lt;region&amp;gt;.qlikcloud.com/api/v1/temp-contents/&amp;lt;id&amp;gt;", I receive a response with a "404 Not Found" status with the following body:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{
    "traceId": "a5075a43661a3dde6633722c7ed6e8b5",
    "errors": [
        {
            "code": "TCS-012",
            "title": "Unable to retrieve metadata",
            "detail": "Metadata can't be retrieved",
            "meta": {
                "locale": "en-US",
                "errorType": "Error",
                "sourceErrors": "permission denied"
            }
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;While it is returning a 404 error, the body's message suggests the client does not have sufficient permissions. I get the same error when trying the "/temp-contents/&amp;lt;id&amp;gt;/details" endpoint.&lt;/P&gt;
&lt;P&gt;The client has the 'Analyzer' entitlement with the 'Tenant Admin' role. It is of type 'Web', has the M2M option checked, and has the trusted consent method.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has access to the 'admin.apps:export' and 'admin.apps:read' scopes as well as the "Can view" and "Can edit" space permissions in the shared space that the app I'm trying to export resides.&amp;nbsp;I've also tried different combinations of space permissions and OAuth scopes to no avail.&lt;/P&gt;
&lt;P&gt;My testing workflow has been to retrieve a token via&amp;nbsp;"https://&amp;lt;tenant&amp;gt;.&amp;lt;region&amp;gt;.qlikcloud.com&lt;SPAN&gt;/oauth/token" with the previously mentioned scopes and use that to authenticate for the export and temp-contents requests.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Am I missing something here? Is there a way that I can debug and evaluate permissions for this, or view what's available in the temporary content service?&lt;/P&gt;
&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 14:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2428327#M20143</guid>
      <dc:creator>Stentone</dc:creator>
      <dc:date>2024-03-07T14:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2445368#M20426</link>
      <description>&lt;P&gt;We have the same issue.&amp;nbsp; We initially went about it a different way outlined in this post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Security-Governance/Qlik-Embed-Chart-Table-ExportData-throws-quot-Access-Denied-quot/m-p/2440829#M2081" target="_blank"&gt;https://community.qlik.com/t5/Security-Governance/Qlik-Embed-Chart-Table-ExportData-throws-quot-Access-Denied-quot/m-p/2440829#M2081&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But got no responses.&amp;nbsp; In the meantime, we rewrote the export/download logic to follow your example above.&lt;/P&gt;
&lt;P&gt;What is interesting is that this works for us in the Microsoft EDGE browser, but fails with the TCS-012: Permission Denied, Metadata can't be retrieved message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if any Qlik folks can chime in here, or if the OP has found a solution, we are all ears!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 16:17:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2445368#M20426</guid>
      <dc:creator>wow0609</dc:creator>
      <dc:date>2024-04-26T16:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2445873#M20432</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/221451"&gt;@Stentone&lt;/a&gt;&amp;nbsp;does it work if you use the same OAuth token for both requests? And does it work if the OAuth client has the admin_classic scope?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2024 15:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2445873#M20432</guid>
      <dc:creator>Dave_Channon</dc:creator>
      <dc:date>2024-04-28T15:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2446514#M20439</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/1870"&gt;@Dave_Channon&lt;/a&gt;,&amp;nbsp;I am using the same OAuth token for both requests when the error comes up. Since then, however, I've been able to get it to work by either providing the 'admin_classic' scope (as you mentioned) or the 'user_default' scope.&lt;/P&gt;
&lt;P&gt;The combination of scopes that I am currently using and are working are the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;user_default&lt;/LI&gt;
&lt;LI&gt;spaces.shared:read&lt;/LI&gt;
&lt;LI&gt;spaces.managed:read&lt;/LI&gt;
&lt;LI&gt;spaces.data:read&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I've kept everything else, space permissions and the like mentioned in the original post, the same.&lt;/P&gt;
&lt;P&gt;I'd like to follow the suggestions in the documentation to avoid the use of 'user_default' and 'admin_classic' in favor of least privilege principles, but it seems at least one of the two, from my experience, is required. I am open to trying other configurations if you have suggestions though!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 18:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2446514#M20439</guid>
      <dc:creator>Stentone</dc:creator>
      <dc:date>2024-04-29T18:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2446515#M20440</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/292472"&gt;@wow0609&lt;/a&gt;&amp;nbsp;, thanks for your response. I feel a bit better that someone else has ran into the same issue. I did eventually get it to work which I mention in my previous response to Dave, but I'll highlight again what worked for me if you'd like to replicate it.&lt;/P&gt;
&lt;P&gt;Basically this combination of scopes, and keeping all the other configurations like space permissions the same as my original post, is what does it for me:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;user_default&lt;/LI&gt;
&lt;LI&gt;spaces.shared:read&lt;/LI&gt;
&lt;LI&gt;spaces.managed:read&lt;/LI&gt;
&lt;LI&gt;spaces.data:read&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;It's not my favorite solution since it uses 'user_default', but it gets the job done.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 18:11:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2446515#M20440</guid>
      <dc:creator>Stentone</dc:creator>
      <dc:date>2024-04-29T18:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2461965#M20756</link>
      <description>&lt;P&gt;A quick update - I haven't forgotten about this. We'll provide a solution that supports this, but we have a few things to fix first. My intention is that we provide a scope that allows you to export an app, which supports the end-to-end flow&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 00:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2461965#M20756</guid>
      <dc:creator>Dave_Channon</dc:creator>
      <dc:date>2024-06-13T00:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Permission Denied When Exporting and Downloading App</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2469867#M20904</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/221451"&gt;@Stentone&lt;/a&gt;&amp;nbsp;this has now been fixed. An OAuth user who has access to the space via membership will be able to export apps in that space with two non-admin scopes:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;apps:export&lt;/LI&gt;
&lt;LI&gt;apps:read&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 11 Jul 2024 09:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Permission-Denied-When-Exporting-and-Downloading-App/m-p/2469867#M20904</guid>
      <dc:creator>Dave_Channon</dc:creator>
      <dc:date>2024-07-11T09:33:21Z</dc:date>
    </item>
  </channel>
</rss>

