<?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: get user name from identity manager in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557731#M52054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;esri.id.credentials holds all the credentials for the page and is populated after the login. credential.userId is what you are looking for. Each layer also has a credential object, in case you need credential information for a specific layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One way to get the info is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect(TNMap.map, "onLayerAddResult", function (result, error) { &amp;nbsp; if (result.credential &amp;amp;&amp;amp; result.credential.userId){ &amp;nbsp; console.log(result.credential); &amp;nbsp; }; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2013 18:52:29 GMT</pubDate>
    <dc:creator>MattLane</dc:creator>
    <dc:date>2013-08-12T18:52:29Z</dc:date>
    <item>
      <title>get user name from identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557730#M52053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wondering how one would go about getting the user name entered by an end user, from the identity manager? I have secured services in my app, and users are prompted for authentication by identity manager. I'd like to capture the user name and use this info to modify the interface. For my app, there are only a couple of generic users so its pretty simple. Anyone have an example? Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 16:39:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557730#M52053</guid>
      <dc:creator>ZorbaConlen</dc:creator>
      <dc:date>2013-08-12T16:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: get user name from identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557731#M52054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;esri.id.credentials holds all the credentials for the page and is populated after the login. credential.userId is what you are looking for. Each layer also has a credential object, in case you need credential information for a specific layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One way to get the info is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect(TNMap.map, "onLayerAddResult", function (result, error) { &amp;nbsp; if (result.credential &amp;amp;&amp;amp; result.credential.userId){ &amp;nbsp; console.log(result.credential); &amp;nbsp; }; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 18:52:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557731#M52054</guid>
      <dc:creator>MattLane</dc:creator>
      <dc:date>2013-08-12T18:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: get user name from identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557732#M52055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Matt,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply. That's just what I needed. I can get the username with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;esri.id.credentials[0].userId&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 14:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-user-name-from-identity-manager/m-p/557732#M52055</guid>
      <dc:creator>ZorbaConlen</dc:creator>
      <dc:date>2013-08-13T14:05:49Z</dc:date>
    </item>
  </channel>
</rss>

