<?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: Not able to get current portal logged in user in the deployed custom WAB application in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/not-able-to-get-current-portal-logged-in-user-in/m-p/803983#M5530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When open builder, user has to sign in, so you can get user info. But if the app is deployed in other web server, user is not signed in unless a private resource is requested. So, if you want to get user info in app that deployed in other web server, you can create a widget, which has the login feature .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2015 04:46:18 GMT</pubDate>
    <dc:creator>JunshanLiu</dc:creator>
    <dc:date>2015-10-13T04:46:18Z</dc:date>
    <item>
      <title>Not able to get current portal logged in user in the deployed custom WAB application</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/not-able-to-get-current-portal-logged-in-user-in/m-p/803982#M5529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been successful in getting the portal user in a widget developed using&amp;nbsp; WAB developer version&amp;nbsp; v1.0 . Below is code snippet to get the portal&amp;nbsp; user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"this.portal = portalUtils.getPortal(this.appConfig.portalUrl);&lt;/P&gt;&lt;P&gt;var username = this.portal.user.username;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to get the the current portal username when I debug the widget. I am even able to get the portal username when I launch it through web app builder app url.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/130280_pastedImage_3.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;The issue is when download the code and deploy it in IIS. The application throws the error and the username is undefined . On further debugging what I could find is the application is not able get the portal username.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any guidance&amp;nbsp; on issue would be great. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 13:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/not-able-to-get-current-portal-logged-in-user-in/m-p/803982#M5529</guid>
      <dc:creator>BGGroup</dc:creator>
      <dc:date>2015-10-08T13:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to get current portal logged in user in the deployed custom WAB application</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/not-able-to-get-current-portal-logged-in-user-in/m-p/803983#M5530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When open builder, user has to sign in, so you can get user info. But if the app is deployed in other web server, user is not signed in unless a private resource is requested. So, if you want to get user info in app that deployed in other web server, you can create a widget, which has the login feature .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 04:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/not-able-to-get-current-portal-logged-in-user-in/m-p/803983#M5530</guid>
      <dc:creator>JunshanLiu</dc:creator>
      <dc:date>2015-10-13T04:46:18Z</dc:date>
    </item>
  </channel>
</rss>

