<?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 ArcGIS runtime fails to use portal credential to access federated server content in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgis-runtime-fails-to-use-portal-credential-to/m-p/1698888#M13912</link>
    <description>&lt;P&gt;Hi, normally we ask the user to sign in to the owning portal via OAuth2. Then when they access content from a federated server, I can see the runtime is automatically adding the access token from the OAuth2 credential to the server request. However, for some of our systems, the runtime time fails to do so.&lt;/P&gt;&lt;P&gt;Instead, it makes a request to "&amp;lt;portalUrl&amp;gt;/generateToken?f=json&amp;amp;serverUrl=&amp;lt;serverUrl&amp;gt;&amp;amp;client=referrer&amp;amp;referrer=&amp;lt;name of referrer&amp;gt;". Its seems to be making a&amp;nbsp; request for an AccessTokenCredential, except it left the username, password, and/or token parameters empty. I looked at the headers and could not find any credentials there. Therefore the request is invalid. The response is:&lt;/P&gt;&lt;P&gt;{"error":{"code":400,"message":"Unable to generate token.","details":["Unable to get 'token' from the request or cookie, for server token."]}}&lt;/P&gt;&lt;P&gt;Stacktrace:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;at Esri.ArcGISRuntime.Http.HttpDispatcher.SendAsync(HttpRequestMessage request, HandlerOptions options, CancellationToken cancellationToken)&lt;BR /&gt;at System.Net.Http.HttpClient.&amp;lt;SendAsync&amp;gt;g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.ArcGISTokenWebRequest.RequestTokenAsync()&lt;BR /&gt;at Esri.ArcGISRuntime.Security.ArcGISTokenCredential.GetArcGISTokenAsync(Uri tokenServiceUri, Uri serverUri, String portalToken)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.ArcGISTokenCredential.GenerateTokenImplAsync(ServerInfo serverInfo)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.TokenCredential.TokenGenerationRequest.CreateGenerateTask()&lt;BR /&gt;at Esri.ArcGISRuntime.Security.TokenCredential.GenerateTokenAsync(Uri serviceUri, String userName, String password, GenerateTokenOptions generateTokenOptions)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.AuthenticationManager.GetCredentialAsyncInternal(CredentialRequestInfo credentialRequestInfo, Boolean retry, Boolean throwOnCancel)&lt;/P&gt;&lt;P&gt;1. Could someone clarify how the authentication flow is supposed to work for federated servers ? If I have a valid OAuth2 credential to the owning portal, can I assume the runtime will use that credential to sign-in to the federate server ? If not, what other steps are needed.&lt;/P&gt;&lt;P&gt;2. Is this a bug with ArcGIS runtime ? The fact that its making a request with missing parameters makes it seems like something has gone wrong under the hood.&lt;/P&gt;&lt;P&gt;3. Could using SSO or a reverse proxy on the server/portal cause this ? I'm trying to isolate the factor causing this issue. Nevertheless, I never received an authentication challenge for Proxy or NetworkCredential from the runtime, its always Token authentication type in CredentialRequestInfo.&lt;/P&gt;&lt;P&gt;ArcGIS Enterprise 11.5. ArcGIS .NET Maui Runtime 200.8.1. .NET Maui 9.0.120.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2026 00:08:36 GMT</pubDate>
    <dc:creator>EricLiu</dc:creator>
    <dc:date>2026-04-29T00:08:36Z</dc:date>
    <item>
      <title>ArcGIS runtime fails to use portal credential to access federated server content</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgis-runtime-fails-to-use-portal-credential-to/m-p/1698888#M13912</link>
      <description>&lt;P&gt;Hi, normally we ask the user to sign in to the owning portal via OAuth2. Then when they access content from a federated server, I can see the runtime is automatically adding the access token from the OAuth2 credential to the server request. However, for some of our systems, the runtime time fails to do so.&lt;/P&gt;&lt;P&gt;Instead, it makes a request to "&amp;lt;portalUrl&amp;gt;/generateToken?f=json&amp;amp;serverUrl=&amp;lt;serverUrl&amp;gt;&amp;amp;client=referrer&amp;amp;referrer=&amp;lt;name of referrer&amp;gt;". Its seems to be making a&amp;nbsp; request for an AccessTokenCredential, except it left the username, password, and/or token parameters empty. I looked at the headers and could not find any credentials there. Therefore the request is invalid. The response is:&lt;/P&gt;&lt;P&gt;{"error":{"code":400,"message":"Unable to generate token.","details":["Unable to get 'token' from the request or cookie, for server token."]}}&lt;/P&gt;&lt;P&gt;Stacktrace:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;at Esri.ArcGISRuntime.Http.HttpDispatcher.SendAsync(HttpRequestMessage request, HandlerOptions options, CancellationToken cancellationToken)&lt;BR /&gt;at System.Net.Http.HttpClient.&amp;lt;SendAsync&amp;gt;g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.ArcGISTokenWebRequest.RequestTokenAsync()&lt;BR /&gt;at Esri.ArcGISRuntime.Security.ArcGISTokenCredential.GetArcGISTokenAsync(Uri tokenServiceUri, Uri serverUri, String portalToken)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.ArcGISTokenCredential.GenerateTokenImplAsync(ServerInfo serverInfo)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.TokenCredential.TokenGenerationRequest.CreateGenerateTask()&lt;BR /&gt;at Esri.ArcGISRuntime.Security.TokenCredential.GenerateTokenAsync(Uri serviceUri, String userName, String password, GenerateTokenOptions generateTokenOptions)&lt;BR /&gt;at Esri.ArcGISRuntime.Security.AuthenticationManager.GetCredentialAsyncInternal(CredentialRequestInfo credentialRequestInfo, Boolean retry, Boolean throwOnCancel)&lt;/P&gt;&lt;P&gt;1. Could someone clarify how the authentication flow is supposed to work for federated servers ? If I have a valid OAuth2 credential to the owning portal, can I assume the runtime will use that credential to sign-in to the federate server ? If not, what other steps are needed.&lt;/P&gt;&lt;P&gt;2. Is this a bug with ArcGIS runtime ? The fact that its making a request with missing parameters makes it seems like something has gone wrong under the hood.&lt;/P&gt;&lt;P&gt;3. Could using SSO or a reverse proxy on the server/portal cause this ? I'm trying to isolate the factor causing this issue. Nevertheless, I never received an authentication challenge for Proxy or NetworkCredential from the runtime, its always Token authentication type in CredentialRequestInfo.&lt;/P&gt;&lt;P&gt;ArcGIS Enterprise 11.5. ArcGIS .NET Maui Runtime 200.8.1. .NET Maui 9.0.120.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2026 00:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgis-runtime-fails-to-use-portal-credential-to/m-p/1698888#M13912</guid>
      <dc:creator>EricLiu</dc:creator>
      <dc:date>2026-04-29T00:08:36Z</dc:date>
    </item>
  </channel>
</rss>

