<?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: Connecting to Portal without user input credentials in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022493#M9748</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7529"&gt;@JoeHershman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Just an FYI:&amp;nbsp; While I am certainly not going to tell anyone and I may be wrong, but my understanding is that Runtime is not licensed to run internally on a server.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'll try to confirm this.&amp;nbsp; If true then it seems like an arbitrary limitation.&amp;nbsp; What are .NET developers supposed to use?&amp;nbsp; ArcObjects?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 12:23:42 GMT</pubDate>
    <dc:creator>GeoSolver</dc:creator>
    <dc:date>2021-02-02T12:23:42Z</dc:date>
    <item>
      <title>Connecting to Portal without user input credentials</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022109#M9733</link>
      <description>&lt;P&gt;Are there any best practices for creating ArcGISPortal objects in C#/.NET in scenarios where the code needs to run independently without user input?&lt;/P&gt;&lt;P&gt;In this scenario, I am developing a console app that will be called by Task Scheduler, so a user will not be present to input their username and password to establish the connection to ArcGIS Online.&amp;nbsp; It boils down to these two lines of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;TokenCredential userCredentials = await AuthenticationManager.Current.GenerateCredentialAsync(serviceUri, username, password);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then the token credential is passed to the method that creates the portal object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;portal = await ArcGISPortal.CreateAsync(new Uri(ServiceUrl), userCredentials);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to make this approach work in our scenario I would have to include the username and password in the source code.&amp;nbsp; It could be obfuscated through encrypting/decrypting methods, or stored in settings, but neither of those approaches are secure.&lt;/P&gt;&lt;P&gt;In arcpy a script can leverage the active portal on the host machine.&amp;nbsp; I believe it simply uses the last portal that ArcGIS Pro loggged into.&amp;nbsp; This approach has worked well for us with scripts that are called by Task Scheduler.&amp;nbsp; But in this case we aren't using arcpy.&amp;nbsp; Is there a way with the C# .NET ArcGIS runtime to use an active portal?&amp;nbsp; If not, what is the best practice in this scenario to keep user credential confidential?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 15:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022109#M9733</guid>
      <dc:creator>GeoSolver</dc:creator>
      <dc:date>2021-02-01T15:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to Portal without user input credentials</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022187#M9735</link>
      <description>&lt;P&gt;I don't know that you could access the last portal used by ArcGIS Pro.&amp;nbsp; And even if you could this would be dependent on someone having logged in recently enough that the token has not expired.&lt;/P&gt;&lt;P&gt;Nor sure why you don't want to encrypt a password.&amp;nbsp; Seems on an internal application that would be secure enough.&amp;nbsp; Not sure what other ways ArcGIS Enterprise is used within your organization, but IWA is an option if your users only access through a Windows domain.&amp;nbsp; Using IWA would be my suggested approach if that could work within your organization&lt;/P&gt;&lt;P&gt;Just an FYI:&amp;nbsp; While I am certainly not going to tell anyone and I may be wrong, but my understanding is that Runtime is not licensed to run internally on a server.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 17:29:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022187#M9735</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2021-02-01T17:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to Portal without user input credentials</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022493#M9748</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7529"&gt;@JoeHershman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Just an FYI:&amp;nbsp; While I am certainly not going to tell anyone and I may be wrong, but my understanding is that Runtime is not licensed to run internally on a server.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'll try to confirm this.&amp;nbsp; If true then it seems like an arbitrary limitation.&amp;nbsp; What are .NET developers supposed to use?&amp;nbsp; ArcObjects?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 12:23:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022493#M9748</guid>
      <dc:creator>GeoSolver</dc:creator>
      <dc:date>2021-02-02T12:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to Portal without user input credentials</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022654#M9752</link>
      <description>&lt;P data-unlink="true"&gt;Did you try &lt;SPAN class="selflink"&gt;OAuthClientCredentials&lt;/SPAN&gt; for&amp;nbsp; &lt;A href="https://developers.arcgis.com/net/wpf/api-reference/html/T_Esri_ArcGISRuntime_Security_TokenAuthenticationType.htm" target="_self"&gt;TokenAuthenticationType&lt;/A&gt;&amp;nbsp;&amp;nbsp;?&lt;/P&gt;&lt;P data-unlink="true"&gt;"OAuth access token generated after an authentication on behalf of an application. This authentication uses the OAuth client credentials workflow and &lt;STRONG&gt;doesn't need any UI&lt;/STRONG&gt; (but needs the ClientSecret)."&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 18:04:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022654#M9752</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2021-02-02T18:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to Portal without user input credentials</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022805#M9753</link>
      <description>&lt;P&gt;We use the rest API directly for server side applications that don't require a UI&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 22:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022805#M9753</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2021-02-02T22:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to Portal without user input credentials</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022941#M9755</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/201161"&gt;@KirkKuykendall1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P data-unlink="true"&gt;Did you try &lt;SPAN class="selflink"&gt;OAuthClientCredentials&lt;/SPAN&gt; for&amp;nbsp; &lt;A href="https://developers.arcgis.com/net/wpf/api-reference/html/T_Esri_ArcGISRuntime_Security_TokenAuthenticationType.htm" target="_self"&gt;TokenAuthenticationType&lt;/A&gt;&amp;nbsp;&amp;nbsp;?&lt;/P&gt;&lt;P data-unlink="true"&gt;"OAuth access token generated after an authentication on behalf of an application. This authentication uses the OAuth client credentials workflow and &lt;STRONG&gt;doesn't need any UI&lt;/STRONG&gt; (but needs the ClientSecret)."&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I've done this with the JavaScript API but not using .NET.&amp;nbsp; I'll look into it.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/connecting-to-portal-without-user-input/m-p/1022941#M9755</guid>
      <dc:creator>GeoSolver</dc:creator>
      <dc:date>2021-02-03T12:56:32Z</dc:date>
    </item>
  </channel>
</rss>

