<?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>article QRS API: Reset security rule cache using PowerShell in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/QRS-API-Reset-security-rule-cache-using-PowerShell/ta-p/1769717</link>
    <description>&lt;P&gt;Qlik Sense Repository Service (QRS) security rules cache can be purged by calling the below QRS API end-point. &amp;nbsp;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;POST /systemrule/security/resetcache&lt;/PRE&gt;
&lt;P&gt;The security rules cache is local to a Qlik Sense node. To reset the QRS security rule cache on all nodes, the API must be called to each node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The API call&amp;nbsp;&lt;U&gt;must&lt;/U&gt;&amp;nbsp;be run as the user &lt;STRONG&gt;Internal\sa_repository&lt;/STRONG&gt;. Qlik Sense client certificates &lt;U&gt;must&lt;/U&gt; be used for authentication when calling QRS API as&amp;nbsp;&lt;I&gt;Internal\sa_repository&lt;/I&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;Call QRS API locally on Qlik Sense node&amp;nbsp;or &lt;A href="https://community.qlik.com/t5/Support-Knowledge-Base/Export-client-certificate-and-root-certificate-to-make-API-calls/ta-p/1715515" target="_blank" rel="noopener" data-cke-saved-href="/articles/Basic/Export-client-certificate-and-root-certificate-to-make-API-calls"&gt;Export client certificate and root certificate to make API calls&lt;/A&gt;&amp;nbsp;to a client machine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example on how to reset QRS security cache with PowerShell;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;$qlikserver = 'qlikserver1.domain.local'

$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$xrfkey = "iX83QmNlvu87yyAB"

$url = "https://$($qlikserver):4242/qrs/systemrule/security/resetcache?xrfkey=$($xrfkey)"
$headers = @{}
$headers.Add("X-Qlik-xrfkey","$xrfkey")
$headers.Add("X-Qlik-User","UserDirectory=INTERNAL;UserId=sa_repository")
$body = ''

Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $headers -Certificate $cert&lt;/PRE&gt;
&lt;P&gt;Confirm in Audit_Repository logs that cache has been clear on a specific Qlik Sense node. Looks for a message referring to "Invalidating security filter result", like one of the below examples;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;274	20201105T133845.005+0100	INFO	qlikserver1	Audit.Repository.Repository.Core.Security.SecurityFilterResultCache	
50	a40f96b1-8527-443e-b20e-f1cd72db17a6	DOMAIN\administrator	Invalidating entire security filter result cache due to reset API called&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;36 20201119T151514.709+1100 INFO SU-APAC02 Audit.Repository.Repository.Core.Resource.InternalManagementResource 
51 a47e0207-291b-4bd0-9e1c-5bd598d06d20 DOMAIN\administrator Invalidating SecurityFilterResult cache 0 1977183c69c9974ee6825a7a9a16aa7dfa539f56&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Refernces&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Reference-Redirect.htm" target="_blank" rel="noopener" data-cke-saved-href="https://help.qlik.com/en-US/sense-developer/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Reference-Redirect.htm"&gt;Qlik Sense for developers: Qlik QRS API reference&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4&gt;Environment&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik Sense Enterprise on&amp;nbsp;Windows June 2017 and later&lt;/LI&gt;
&lt;/UL&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 06:20:46 GMT</pubDate>
    <dc:creator>ToniKautto</dc:creator>
    <dc:date>2020-12-21T06:20:46Z</dc:date>
    <item>
      <title>QRS API: Reset security rule cache using PowerShell</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/QRS-API-Reset-security-rule-cache-using-PowerShell/ta-p/1769717</link>
      <description>&lt;P&gt;Qlik Sense Repository Service (QRS) security rules cache can be purged by calling the below QRS API end-point. &amp;nbsp;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;POST /systemrule/security/resetcache&lt;/PRE&gt;
&lt;P&gt;The security rules cache is local to a Qlik Sense node. To reset the QRS security rule cache on all nodes, the API must be called to each node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The API call&amp;nbsp;&lt;U&gt;must&lt;/U&gt;&amp;nbsp;be run as the user &lt;STRONG&gt;Internal\sa_repository&lt;/STRONG&gt;. Qlik Sense client certificates &lt;U&gt;must&lt;/U&gt; be used for authentication when calling QRS API as&amp;nbsp;&lt;I&gt;Internal\sa_repository&lt;/I&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;Call QRS API locally on Qlik Sense node&amp;nbsp;or &lt;A href="https://community.qlik.com/t5/Support-Knowledge-Base/Export-client-certificate-and-root-certificate-to-make-API-calls/ta-p/1715515" target="_blank" rel="noopener" data-cke-saved-href="/articles/Basic/Export-client-certificate-and-root-certificate-to-make-API-calls"&gt;Export client certificate and root certificate to make API calls&lt;/A&gt;&amp;nbsp;to a client machine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example on how to reset QRS security cache with PowerShell;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;$qlikserver = 'qlikserver1.domain.local'

$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$xrfkey = "iX83QmNlvu87yyAB"

$url = "https://$($qlikserver):4242/qrs/systemrule/security/resetcache?xrfkey=$($xrfkey)"
$headers = @{}
$headers.Add("X-Qlik-xrfkey","$xrfkey")
$headers.Add("X-Qlik-User","UserDirectory=INTERNAL;UserId=sa_repository")
$body = ''

Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $headers -Certificate $cert&lt;/PRE&gt;
&lt;P&gt;Confirm in Audit_Repository logs that cache has been clear on a specific Qlik Sense node. Looks for a message referring to "Invalidating security filter result", like one of the below examples;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;274	20201105T133845.005+0100	INFO	qlikserver1	Audit.Repository.Repository.Core.Security.SecurityFilterResultCache	
50	a40f96b1-8527-443e-b20e-f1cd72db17a6	DOMAIN\administrator	Invalidating entire security filter result cache due to reset API called&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;36 20201119T151514.709+1100 INFO SU-APAC02 Audit.Repository.Repository.Core.Resource.InternalManagementResource 
51 a47e0207-291b-4bd0-9e1c-5bd598d06d20 DOMAIN\administrator Invalidating SecurityFilterResult cache 0 1977183c69c9974ee6825a7a9a16aa7dfa539f56&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Refernces&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Reference-Redirect.htm" target="_blank" rel="noopener" data-cke-saved-href="https://help.qlik.com/en-US/sense-developer/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Reference-Redirect.htm"&gt;Qlik Sense for developers: Qlik QRS API reference&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4&gt;Environment&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik Sense Enterprise on&amp;nbsp;Windows June 2017 and later&lt;/LI&gt;
&lt;/UL&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 06:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/QRS-API-Reset-security-rule-cache-using-PowerShell/ta-p/1769717</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2020-12-21T06:20:46Z</dc:date>
    </item>
  </channel>
</rss>

