<?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 Qlik Sense Header Authentication 401 Error in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/ta-p/1712391</link>
    <description>&lt;P&gt;When setting up Header Authentication in Qlik Sense, the browser displays a 401 Error, "Could not authenticate the request: Expected an authentication header".&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 656px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57219i4712E86AFEC20982/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Environments:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik Sense, all versions&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This error means that the browser is not sending the required authorization headers.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For example, given a &lt;I&gt;&lt;STRONG&gt;Virtual Proxy&lt;/STRONG&gt;&lt;/I&gt; configuration as follows:&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;&lt;STRONG&gt;Setting&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Prefix&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;dynamic-header-auth&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Authentication Method&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;Header authentication dynamic user directory&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Header authentication header name&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;my-header&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Header authentication dynamic user directory&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;$ud\\$id&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57220i51D1EC0F93F63C4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Given a server with name qlikserver1.domain.local, this virtual proxy would be accessed at&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;&lt;A href="https://qlikserver1.domain.local/dynamic-header-auth/hub" target="test_blank"&gt;https://qlikserver1.domain.local/dynamic-header-auth/hub&lt;/A&gt;&lt;/STRONG&gt; &lt;/I&gt;with the header &lt;STRONG&gt;&lt;I&gt;my-header: some-user\some-domain.&lt;BR /&gt;&lt;BR /&gt;Testing with the ModHeader Extension for Chrome:&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;In the below example, the "ModHeader" Chrome browser extension is used to inject the headers. If the headers are not provided, then the error "Could not authenticate the request: Expected an authentication header" is thrown.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57221i154A28FEB1D9E7AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;STRONG&gt;Testing with Powershell:&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt;&lt;BR /&gt;You can use Powershell's Invoke-WebRequest method to verify this functionality as well, if you do not want to or are not able to install Chrome or the ModHeader extension.&lt;/P&gt;
&lt;PRE&gt;$hdrs = @{}
$hdrs.Add("my-header","some-domain\some-user")
$url = "https://qlikserver1.domain.local/dynamic-header-auth/hub"
Invoke-WebRequest -Uri $url -Method Get -Headers $hdrs&lt;/PRE&gt;
&lt;P&gt;An example successful response:&lt;/P&gt;
&lt;PRE&gt;StatusCode        : 200
StatusDescription : OK
Content           : &amp;lt;!doctype html&amp;gt;
                    &amp;lt;html lang="en"&amp;gt;...&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;An example error response:&lt;/P&gt;
&lt;PRE&gt;Invoke-WebRequest : &amp;lt;!doctype html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;meta charset="utf-8"/&amp;gt;
        &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"/&amp;gt;
        &amp;lt;meta name="google" value="notranslate"/&amp;gt;
        &amp;lt;title&amp;gt;401 - Http code: 401&amp;lt;/title&amp;gt;....&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;I&gt;Qlik does&amp;nbsp;&lt;STRONG&gt;NOT&lt;/STRONG&gt;&amp;nbsp;support the 3rd&amp;nbsp;party&amp;nbsp;software mentioned and used in this documentation. Please use them at your own discretion and, if concerned, contact the proper IT team within your company to verify the ability to use non-Qlik related software in the environment.?&lt;BR /&gt;&lt;BR /&gt;These examples/code are made available "&lt;STRONG&gt;AS IS&lt;/STRONG&gt;" without warranty of any kind. Qlik support agreement does &lt;STRONG&gt;NOT&lt;/STRONG&gt; cover support for this code, please use at your own discretion and, if concerned, contact the proper IT team within your company.&lt;/I&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jun 2021 17:46:14 GMT</pubDate>
    <dc:creator>Sonja_Bauernfeind</dc:creator>
    <dc:date>2021-06-21T17:46:14Z</dc:date>
    <item>
      <title>Qlik Sense Header Authentication 401 Error</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/ta-p/1712391</link>
      <description>&lt;P&gt;When setting up Header Authentication in Qlik Sense, the browser displays a 401 Error, "Could not authenticate the request: Expected an authentication header".&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 656px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57219i4712E86AFEC20982/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Environments:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik Sense, all versions&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This error means that the browser is not sending the required authorization headers.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For example, given a &lt;I&gt;&lt;STRONG&gt;Virtual Proxy&lt;/STRONG&gt;&lt;/I&gt; configuration as follows:&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;&lt;STRONG&gt;Setting&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Prefix&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;dynamic-header-auth&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Authentication Method&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;Header authentication dynamic user directory&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Header authentication header name&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;my-header&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="317.984px" height="25px"&gt;Header authentication dynamic user directory&lt;/TD&gt;
&lt;TD width="317.984px" height="25px"&gt;$ud\\$id&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57220i51D1EC0F93F63C4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Given a server with name qlikserver1.domain.local, this virtual proxy would be accessed at&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;&lt;A href="https://qlikserver1.domain.local/dynamic-header-auth/hub" target="test_blank"&gt;https://qlikserver1.domain.local/dynamic-header-auth/hub&lt;/A&gt;&lt;/STRONG&gt; &lt;/I&gt;with the header &lt;STRONG&gt;&lt;I&gt;my-header: some-user\some-domain.&lt;BR /&gt;&lt;BR /&gt;Testing with the ModHeader Extension for Chrome:&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;In the below example, the "ModHeader" Chrome browser extension is used to inject the headers. If the headers are not provided, then the error "Could not authenticate the request: Expected an authentication header" is thrown.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57221i154A28FEB1D9E7AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;STRONG&gt;Testing with Powershell:&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt;&lt;BR /&gt;You can use Powershell's Invoke-WebRequest method to verify this functionality as well, if you do not want to or are not able to install Chrome or the ModHeader extension.&lt;/P&gt;
&lt;PRE&gt;$hdrs = @{}
$hdrs.Add("my-header","some-domain\some-user")
$url = "https://qlikserver1.domain.local/dynamic-header-auth/hub"
Invoke-WebRequest -Uri $url -Method Get -Headers $hdrs&lt;/PRE&gt;
&lt;P&gt;An example successful response:&lt;/P&gt;
&lt;PRE&gt;StatusCode        : 200
StatusDescription : OK
Content           : &amp;lt;!doctype html&amp;gt;
                    &amp;lt;html lang="en"&amp;gt;...&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;An example error response:&lt;/P&gt;
&lt;PRE&gt;Invoke-WebRequest : &amp;lt;!doctype html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;meta charset="utf-8"/&amp;gt;
        &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"/&amp;gt;
        &amp;lt;meta name="google" value="notranslate"/&amp;gt;
        &amp;lt;title&amp;gt;401 - Http code: 401&amp;lt;/title&amp;gt;....&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;I&gt;Qlik does&amp;nbsp;&lt;STRONG&gt;NOT&lt;/STRONG&gt;&amp;nbsp;support the 3rd&amp;nbsp;party&amp;nbsp;software mentioned and used in this documentation. Please use them at your own discretion and, if concerned, contact the proper IT team within your company to verify the ability to use non-Qlik related software in the environment.?&lt;BR /&gt;&lt;BR /&gt;These examples/code are made available "&lt;STRONG&gt;AS IS&lt;/STRONG&gt;" without warranty of any kind. Qlik support agreement does &lt;STRONG&gt;NOT&lt;/STRONG&gt; cover support for this code, please use at your own discretion and, if concerned, contact the proper IT team within your company.&lt;/I&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 17:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/ta-p/1712391</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2021-06-21T17:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Header Authentication 401 Error</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/tac-p/1741359#M695</link>
      <description>&lt;P&gt;&amp;nbsp;problem in this post is that this chrome extension sets the header in all requests not only in the first request , which can't be done if you are trying to implement this behavior from a mobile app web view&lt;/P&gt;&lt;P&gt;Normally you should set the header in first request and then in subsequent child requests qlik should depend on the value provided in the session cookie&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 20:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/tac-p/1741359#M695</guid>
      <dc:creator>abadreamer</dc:creator>
      <dc:date>2020-09-04T20:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Header Authentication 401 Error</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/tac-p/1756699#M946</link>
      <description>&lt;P&gt;I am trying to reverse proxy an app with header authentication and I am having this issue (using nginx). It works with the named extension but not when using nginx. Anybody an idea?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 14:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/tac-p/1756699#M946</guid>
      <dc:creator>david_kesselhei</dc:creator>
      <dc:date>2020-10-28T14:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Header Authentication 401 Error</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/tac-p/1758179#M994</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28514"&gt;@david_kesselhei&lt;/a&gt;&amp;nbsp; For better visibility, I would recommend heading over to our &lt;A href="https://community.qlik.com/t5/Qlik-Sense-Integration-Extensions-APIs/bd-p/qlik-sense-integration-extension-api" target="_blank" rel="noopener"&gt;Qlik Sense Integration forums&lt;/A&gt; and post your question there, including any and all supporting information that you can gather (screen caps/log files, etc).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 15:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Header-Authentication-401-Error/tac-p/1758179#M994</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2020-11-03T15:46:53Z</dc:date>
    </item>
  </channel>
</rss>

