<?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 How to access Qlik Repository Service using certificate based auth from Remote Linux Machine? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-Qlik-Repository-Service-using-certificate-based/m-p/2004057#M17573</link>
    <description>&lt;P&gt;Dear Team, Basically I am trying to use Qlik_CLI powershell module to access Qlik Repository Service (QRS) .&lt;/P&gt;
&lt;P&gt;Ref Link :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://adamhaydon.com/Qlik-Cli-Windows/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://adamhaydon.com/Qlik-Cli-Windows/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But requirement is I have to Run Qlik-CLI commands&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Connect-Qlik&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from Linux/Mac Terminal using certificate generated from Qlik QMC&lt;/P&gt;
&lt;P&gt;Ref Link :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Export-client-certificate-and-root-certificate-to-make-API-calls/ta-p/1715515" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Official-Support-Articles/Export-client-certificate-and-root-certifica...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now I have taken those&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;client.pfx,Server.pfx and root.cer&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from Qlik Server and paste in mac server inside /certificate folder&lt;/P&gt;
&lt;P&gt;Command used :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Get-PfxCertificate "/Users/mac_username/Development/powershell/certificate/client.pfx" | Connect-Qlik -computername "QlikHostname" -username "Domain\adminUser" -TrustAllCerts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error Snippet:&lt;/P&gt;
&lt;P&gt;Line | 66 | … $result = Invoke-RestMethod @paramInvokeRestMethod @params | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Unable to cast object of type 'System.Security.Cryptography.X509Certificates.X509Certificate' to type | 'System.Security.Cryptography.X509Certificates.X509Certificate2'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Request you please help with process how to Execute Qlik Cli Powershell module from remote machine using certificate while Qlik Repo Service is running inside another windows server .&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2022 11:25:03 GMT</pubDate>
    <dc:creator>satyaban</dc:creator>
    <dc:date>2022-11-14T11:25:03Z</dc:date>
    <item>
      <title>How to access Qlik Repository Service using certificate based auth from Remote Linux Machine?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-Qlik-Repository-Service-using-certificate-based/m-p/2004057#M17573</link>
      <description>&lt;P&gt;Dear Team, Basically I am trying to use Qlik_CLI powershell module to access Qlik Repository Service (QRS) .&lt;/P&gt;
&lt;P&gt;Ref Link :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://adamhaydon.com/Qlik-Cli-Windows/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://adamhaydon.com/Qlik-Cli-Windows/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But requirement is I have to Run Qlik-CLI commands&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Connect-Qlik&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from Linux/Mac Terminal using certificate generated from Qlik QMC&lt;/P&gt;
&lt;P&gt;Ref Link :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Export-client-certificate-and-root-certificate-to-make-API-calls/ta-p/1715515" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Official-Support-Articles/Export-client-certificate-and-root-certifica...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now I have taken those&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;client.pfx,Server.pfx and root.cer&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from Qlik Server and paste in mac server inside /certificate folder&lt;/P&gt;
&lt;P&gt;Command used :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Get-PfxCertificate "/Users/mac_username/Development/powershell/certificate/client.pfx" | Connect-Qlik -computername "QlikHostname" -username "Domain\adminUser" -TrustAllCerts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error Snippet:&lt;/P&gt;
&lt;P&gt;Line | 66 | … $result = Invoke-RestMethod @paramInvokeRestMethod @params | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Unable to cast object of type 'System.Security.Cryptography.X509Certificates.X509Certificate' to type | 'System.Security.Cryptography.X509Certificates.X509Certificate2'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Request you please help with process how to Execute Qlik Cli Powershell module from remote machine using certificate while Qlik Repo Service is running inside another windows server .&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 11:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-Qlik-Repository-Service-using-certificate-based/m-p/2004057#M17573</guid>
      <dc:creator>satyaban</dc:creator>
      <dc:date>2022-11-14T11:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Qlik Repository Service using certificate based auth from Remote Linux Machine?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-Qlik-Repository-Service-using-certificate-based/m-p/2004344#M17578</link>
      <description>&lt;P&gt;As you can see from the Error Message you are getting, the command "Get-PFXCertificate" is casting the certificate as the wrong type "X509Certificate" when it should be importing as a "X509Certificate2"&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can work around this by declaring the type of the object when importing the certificate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[System.Security.Cryptography.X509Certificates.X509Certificate2]$Cert = Get-PfxCertificate /home/marc/Client/client.pfx

Connect-Qlik -Certificate $Cert -Username 'domain\user' -Computername sense01 -TrustAllCerts&lt;/LI-CODE&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="Marc_0-1668471929774.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93646i31E641D65CB83AC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Marc_0-1668471929774.png" alt="Marc_0-1668471929774.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using your example this would look like this&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[System.Security.Cryptography.X509Certificates.X509Certificate2]$ClientCert = Get-PfxCertificate "/Users/mac_username/Development/powershell/certificate/client.pfx"

Connect-Qlik -Certificate $ClientCert -computername "QlikHostname" -username "Domain\adminUser" -TrustAllCerts&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 00:34:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-Qlik-Repository-Service-using-certificate-based/m-p/2004344#M17578</guid>
      <dc:creator>Marc</dc:creator>
      <dc:date>2022-11-15T00:34:56Z</dc:date>
    </item>
  </channel>
</rss>

