<?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 Get current user info in Web App builder in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-current-user-info-in-web-app-builder/m-p/212651#M5847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a web mapping application and a group map shared with some user registered, the user enters by login. What I want to accomplish is to get the information of the current user in the application, like username, group id, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried without success using the object portal and its functions like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var portal = new arcgisPortal.Portal('my url');&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var user = portal.getPortalUser();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;console.log(user);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;console.log("user id: " + user.username);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think that what I need is to access to the portal object of the application, and this code is creating a new portal instead. I have seen that using the property credential, you can access to this info as well. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 May 2017 09:02:15 GMT</pubDate>
    <dc:creator>SantiagoMontoya</dc:creator>
    <dc:date>2017-05-17T09:02:15Z</dc:date>
    <item>
      <title>Get current user info in Web App builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-current-user-info-in-web-app-builder/m-p/212651#M5847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a web mapping application and a group map shared with some user registered, the user enters by login. What I want to accomplish is to get the information of the current user in the application, like username, group id, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried without success using the object portal and its functions like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var portal = new arcgisPortal.Portal('my url');&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var user = portal.getPortalUser();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;console.log(user);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;console.log("user id: " + user.username);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think that what I need is to access to the portal object of the application, and this code is creating a new portal instead. I have seen that using the property credential, you can access to this info as well. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 09:02:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-current-user-info-in-web-app-builder/m-p/212651#M5847</guid>
      <dc:creator>SantiagoMontoya</dc:creator>
      <dc:date>2017-05-17T09:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get current user info in Web App builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-current-user-info-in-web-app-builder/m-p/212652#M5848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Santiago,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;See this thread:&amp;nbsp;&lt;A href="https://community.esri.com/thread/185734-using-portalutils-to-get-current-logged-user-wont-work-for-in-panel-widgets"&gt;https://community.esri.com/thread/185734-using-portalutils-to-get-current-logged-user-wont-work-for-in-panel-widgets&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 13:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-current-user-info-in-web-app-builder/m-p/212652#M5848</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-05-17T13:06:29Z</dc:date>
    </item>
  </channel>
</rss>

