<?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: Retrieve logged in user + role from AGOL in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30614#M788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this, will start exploring this option, as this would be my other option on how to integrate the 2 systems and know which user/role is currently on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always thanks a lot for the information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 May 2018 13:35:49 GMT</pubDate>
    <dc:creator>BrettKruger</dc:creator>
    <dc:date>2018-05-10T13:35:49Z</dc:date>
    <item>
      <title>Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30605#M779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering of someone could assist me or point me into a direction, perhaps someone has done this before but I have not gotten much info on it just yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a 3rd party system I wrote using .net. This system is has a link in the organizational online portal to it and on the feature class as well. Although I need to grab the user that has logged in via their online portal in .NET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to access the token from the server side as the user lands in the 3rd party system? Using vb.net in the backend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also by grabbing the token, I see in JS it gives the user + role but like I said I need to grab it on the system load and store it perhaps somewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas would be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 09:38:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30605#M779</guid>
      <dc:creator>BrettKruger</dc:creator>
      <dc:date>2018-05-07T09:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30606#M780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brett,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Here is how I pass JS Variable from JS to .Net code behind:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a hidden field variable in the vb.net html code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="namespace token"&gt;asp:&lt;/SPAN&gt;HiddenField&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;ID&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;jsVariable&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;runat&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;server&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;and in javascript you can assign your js value to the hidden variable using&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;script type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"text/javascript"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; myfunction &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; jsVariable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getElementById&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'jsVariable'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; jsVariable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'javascript var'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;script&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;then you can read the hidden variable field from the code behind using&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;dim variable &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; String &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; jsVariable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Value&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:14:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30606#M780</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T21:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30607#M781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet again thanks for your reply and input!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will go test this and come back but it sounds really good, I knew it had to be something simple and accessible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 13:28:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30607#M781</guid>
      <dc:creator>BrettKruger</dc:creator>
      <dc:date>2018-05-07T13:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30608#M782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do understand the code given above, to pass a JS variable over and store it in a hidden field to retrieve from the server side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is however, if a user is logged in on the AGOL and uses the link provided in there to my system, how would I grab the person who is logged in username and the role assigned to him in his organization?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 08:37:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30608#M782</guid>
      <dc:creator>BrettKruger</dc:creator>
      <dc:date>2018-05-09T08:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30609#M783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Brett,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp;So let me see if I am following you... You have a JS app that the user clicks on a link and it takes then to an VB.Net app and you want to send the AGOL user info to that VB.Net app? If that is the case then url parameters in the link is the best solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 12:43:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30609#M783</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-09T12:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30610#M784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not exactly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically, a client of mine has their own ArcGIS online portal at ****.maps.arcgis.com.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a link there to another system that I wrote using vb.net that I host on my own server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is that users in this organization has different roles, now depending on these roles coming from ArcGIS online they get to access certain parts in my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I need to do is, as soon as they use the link provided in their online portal I need to somehow grab the user that is logged in as well as the role assigned to him.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It comes down to linking my system which has nothing to do with ArcGIS online, to be able to get users + roles when landing on my home page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My thoughts was that as soon as someone logs into their ArcGIS Online, it has to store the token somehow in the browser or somewhere for external systems to be able to get that type of info?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes sense &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 13:49:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30610#M784</guid>
      <dc:creator>BrettKruger</dc:creator>
      <dc:date>2018-05-09T13:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30611#M785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brett,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Hmm... The fact that you do not have control of the code that the link exists in makes this complicated... Your right there has to be some record of the user info but that info would be encrypted and controlled by the originating Portal and I don't know of a way to gain access to it from just a link in the Portal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 14:23:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30611#M785</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-09T14:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30612#M786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only possible way I thought to overcome this is maybe do it in a widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to have a user click a feature on the map and then get the user that is logged in and its role assigned?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been playing around the identityManager but have not had much luck, is this the right route or is it possible to get the info through a widget when the user clicks the map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again for all your help and responses.&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 13:12:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30612#M786</guid>
      <dc:creator>BrettKruger</dc:creator>
      <dc:date>2018-05-10T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30613#M787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brett,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Getting the logged in user is pretty simple in a WAB widget. See this thread:&lt;/P&gt;&lt;P&gt;&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>Thu, 10 May 2018 13:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30613#M787</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-10T13:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve logged in user + role from AGOL</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30614#M788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this, will start exploring this option, as this would be my other option on how to integrate the 2 systems and know which user/role is currently on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always thanks a lot for the information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 13:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/retrieve-logged-in-user-role-from-agol/m-p/30614#M788</guid>
      <dc:creator>BrettKruger</dc:creator>
      <dc:date>2018-05-10T13:35:49Z</dc:date>
    </item>
  </channel>
</rss>

