<?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: QPS API - Session - Get User in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QPS-API-Session-Get-User/m-p/1298193#M7225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You typed this so long ago, but I wanted to offer a trick for doing that, if you still need it:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;var app = qlik.currApp();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; app.model.enigmaModel.evaluate(&lt;STRONG&gt;'OSUser()'&lt;/STRONG&gt;).then(function(reply){&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(reply); //reply will contain a string like &lt;EM&gt;UserDirectory=QLIKDOMAIN; UserId=userIvan (in my case)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This code will evaluate the OSUser() expression, which is not in the API but is present in the frontend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2018 09:47:06 GMT</pubDate>
    <dc:creator>IVAN-FELIPE</dc:creator>
    <dc:date>2018-06-19T09:47:06Z</dc:date>
    <item>
      <title>QPS API - Session - Get User</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QPS-API-Session-Get-User/m-p/1298192#M7224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem: QPS API session REST API GET returns 500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example session module root:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://thehost/qps" rel="nofollow" target="_blank"&gt;http://thehost/qps&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The following http GET returns expected JSON:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;A class="jive-link-external-small" href="http://thehost/qps/user" rel="nofollow" target="_blank"&gt;http://thehost/qps/user&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Returns:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;{"userDirectory": "THE_DOMAIN", "userId": "myUserId", "userName": "Me", "logoutUri": "&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;A class="jive-link-external-small" href="http://thehost/" rel="nofollow" target="_blank"&gt;http://thehost&lt;/A&gt;&lt;/SPAN&gt;/qps/user"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2) ..However the following http GET gives me a 500:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;500 (No rest method matches the incoming request)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;A class="jive-link-external-small" href="http://thehost/qps/user/THE_DOMAIN/Me" rel="nofollow" target="_blank"&gt;http://thehost/qps/user/THE_DOMAIN/Me&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Spec:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/June2017/Subsystems/ProxyServiceAPI/Content/ProxyServiceAPI/ProxyServiceAPI-Session-Module-API-User-Get.htm" style="font-size: 13.3333px;" title="https://help.qlik.com/en-US/sense-developer/June2017/Subsystems/ProxyServiceAPI/Content/ProxyServiceAPI/ProxyServiceAPI-Session-Module-API-User-Get.htm"&gt;https://help.qlik.com/en-US/sense-developer/June2017/Subsystems/ProxyServiceAPI/Content/ProxyServiceAPI/ProxyServiceAPI-…&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Ideas?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 17:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QPS-API-Session-Get-User/m-p/1298192#M7224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-26T17:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: QPS API - Session - Get User</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QPS-API-Session-Get-User/m-p/1298193#M7225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You typed this so long ago, but I wanted to offer a trick for doing that, if you still need it:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;var app = qlik.currApp();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; app.model.enigmaModel.evaluate(&lt;STRONG&gt;'OSUser()'&lt;/STRONG&gt;).then(function(reply){&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(reply); //reply will contain a string like &lt;EM&gt;UserDirectory=QLIKDOMAIN; UserId=userIvan (in my case)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This code will evaluate the OSUser() expression, which is not in the API but is present in the frontend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QPS-API-Session-Get-User/m-p/1298193#M7225</guid>
      <dc:creator>IVAN-FELIPE</dc:creator>
      <dc:date>2018-06-19T09:47:06Z</dc:date>
    </item>
  </channel>
</rss>

