<?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: UserCredential concatenates @Domain in 100x in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287335#M1925</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/6510"&gt;Aaron Dick&lt;/A&gt;‌,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for bringing this to our attention, I have looked into&amp;nbsp;it and I found that this is a bug on our API. We are planning to fix it in our future release and unfortunately there's no workaround other than not using usernames that have a 'backward-slash' when using a UserCredential.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the inconvenience.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Nov 2019 18:41:11 GMT</pubDate>
    <dc:creator>Erick_1</dc:creator>
    <dc:date>2019-11-07T18:41:11Z</dc:date>
    <item>
      <title>UserCredential concatenates @Domain in 100x</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287333#M1923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am seeing behavior in 100.6 (probably there in all 100.x) where UserCredential concatenates @Domain onto the end of the username.&amp;nbsp; So if I do the following ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UserCredential mAgencyCredentials = new UserCredential(Domain\mMouse, password);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mAgencyCredential immediately returns ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"mMouse@domain"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in LogCat...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mAgencyCredentials = {UserCredential@12352} &lt;BR /&gt; mPassword = "obfuscated"&lt;BR /&gt; mReferer = null&lt;BR /&gt; mToken = null&lt;BR /&gt; mUsername = "mMouse@Domain"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I am using the UserCredential to access an on premise feature service (shared via AGOL in our organization but the service itself is on an internal ArcGIS Server instance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The username format causes us all sorts of problems from that moment forward as described below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="" style="color: #222222; font-size: small;"&gt;The behavior where the runtime SDK adds the&amp;nbsp;@DOMAIN suffix to the user account is a problem with our 'stand alone' (not portal/server federated) ArcGIS Server environment.&amp;nbsp; This is similar to behaviors we noted&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the MAR 2017 Esri Case #01907532 - "ArcGIS Server Token Authentication Login Format Issues".&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="" style="color: #222222; font-size: small;"&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #222222; font-size: small;"&gt;Here is the server authentication setup:&lt;/DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;BLOCKQUOTE style="color: #222222; border: none; font-size: small; margin: 0px 0px 0px 40px;"&gt;&lt;DIV dir="ltr"&gt;&lt;DIV dir="ltr"&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;IMG alt="image.png" class="" data-image-whitelisted="" height="122" src="https://mail.google.com/mail/u/1?ui=2&amp;amp;ik=558ab161e7&amp;amp;attid=0.2&amp;amp;permmsgid=msg-f:1648017054366143279&amp;amp;th=16deeec78547932f&amp;amp;view=fimg&amp;amp;sz=s0-l75-ft&amp;amp;attbid=ANGjdJ9teRSRwiQFNEcuXQWjWgQ7NQseqXw8yM1l8A9hZcowPVb2ZkhAvhLaO-XBzQCBo-6Jf4a-lko5GBPExLS8LeaIGXqbPKMmT6y0hoAzGs5UtdlyTj_rpLh8vt4&amp;amp;disp=emb&amp;amp;realattid=ii_k20ke5fk1" width="498" /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;DIV class="" style="color: #222222; font-size: small;"&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #222222; font-size: small;"&gt;&lt;SPAN class=""&gt;From&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the web-adaptor server, I enabled 'failed request tracing' rules to dump .xml log files for each request.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;From&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that, I gather that the code did the following:&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="" style="color: #222222; font-size: small;"&gt;&lt;OL&gt;&lt;LI style="margin-left: 15px;"&gt;Client (mobile device) attempted access to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.example.com/arcgis/rest/services/folder/servicename/FeatureServer" style="color: #1155cc;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.example.com/arcgis/rest/services/folder/servicename/FeatureServer&lt;/A&gt;&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Server responded:&amp;nbsp;&lt;BR /&gt;Buffer="{"error":{"code":499,"message":"Token Required","details":[]}}"&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Client requested&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.example.com/arcgis/rest/info" style="color: #1155cc;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.example.com/arcgis/rest/info&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to obtain authentication information.&amp;nbsp; Server responded appropriately (isTokenBasedSecurity = True and token URL)&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Client made a request to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.example.com/arcgis/tokens/generateToken" style="color: #1155cc;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.example.com/arcgis/tokens/generateToken&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and supplied the username&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the following format:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;username@DOMAIN&lt;/STRONG&gt;&amp;nbsp; (ex: 'mMouse@Domain').&amp;nbsp; The&amp;nbsp;@ was encoded to %40&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Server responded with a valid token&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Client then made a request to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.example.com/arcgis/tokens" style="color: #1155cc;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.example.com/arcgis/tokens&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and supplied the username&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the same 'username@DOMAIN' format.&amp;nbsp; Server again provided a token&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Client then made the same request as #1 but added the header&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;X-Esri-Authentication&lt;/STRONG&gt;&amp;nbsp;with the value&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Bearer &amp;lt;TOKEN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;FROM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the /arcgis/tokens url (second token request)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Server responded with:&amp;nbsp;&lt;BR /&gt;Buffer="{"error":{"code":-1,"message":"Unable to check permission on resource &amp;lt;Folder&amp;gt;/&amp;lt;Service&amp;gt;.mapserver.Failed to compute the privilege for the user '&amp;lt;USERNAME&amp;gt;@&amp;lt;DOMAIN&amp;gt;'. Could not find user account&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the Identity Store.","details":[]}}"&lt;/LI&gt;&lt;LI style="margin-left: 15px;"&gt;Furthermore, the ArcGIS Server logs return:&amp;nbsp; &amp;nbsp;Blocked out actual username but would be "mMouse@Domain&lt;BR /&gt;&lt;DIV&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/466655_pastedImage_3.png" /&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:53:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287333#M1923</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T13:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: UserCredential concatenates @Domain in 100x</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287334#M1924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A little more information.&amp;nbsp; This is the LogCat from Android Studio....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error = {ArcGISRuntimeException@9380} "com.esri.arcgisruntime.ArcGISRuntimeException: Attempted to use invalid JSON: Name property is missing"&lt;BR /&gt;error.mAdditionalMessage = "Name property is missing"&lt;BR /&gt;error.mCause = null&lt;BR /&gt;error.mCode = 21&lt;BR /&gt;error.mDomain = {ArcGISRuntimeException$ErrorDomain@9390} "ARCGIS_RUNTIME"&lt;BR /&gt;error.mErrorMessage = "Attempted to use invalid JSON"&lt;BR /&gt;error.backtrace = null&lt;BR /&gt;error.cause = {ArcGISRuntimeException@9380} "com.esri.arcgisruntime.ArcGISRuntimeException: Attempted to use invalid JSON: Name property is missing"&lt;BR /&gt;error.detailMessage = null&lt;BR /&gt;error.stackTrace = {StackTraceElement[2]@9395} &lt;BR /&gt;error.suppressedExceptions = {Collections$EmptyList@9396} size = 0&lt;BR /&gt;error.shadow$_klass_ = {Class@6078} "class com.esri.arcgisruntime.ArcGISRuntimeException"&lt;BR /&gt;error.shadow$_monitor_ = 1073823972&lt;BR /&gt;cause = null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2019 04:12:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287334#M1924</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-11-04T04:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: UserCredential concatenates @Domain in 100x</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287335#M1925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/6510"&gt;Aaron Dick&lt;/A&gt;‌,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for bringing this to our attention, I have looked into&amp;nbsp;it and I found that this is a bug on our API. We are planning to fix it in our future release and unfortunately there's no workaround other than not using usernames that have a 'backward-slash' when using a UserCredential.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the inconvenience.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2019 18:41:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/usercredential-concatenates-domain-in-100x/m-p/287335#M1925</guid>
      <dc:creator>Erick_1</dc:creator>
      <dc:date>2019-11-07T18:41:11Z</dc:date>
    </item>
  </channel>
</rss>

