{"id":2715362,"date":"2025-03-10T09:30:18","date_gmt":"2025-03-10T16:30:18","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2715362"},"modified":"2025-03-10T10:51:52","modified_gmt":"2025-03-10T17:51:52","slug":"new-auth-apis-for-dotnet-sdk","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk","title":{"rendered":"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET"},"author":357152,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[738191],"tags":[758502,764502,24941,777722,24071],"industry":[],"product":[769142],"class_list":["post-2715362","blog","type-blog","status-publish","format-standard","hentry","category-developers","tag-app-development","tag-authentication","tag-https","tag-oauth","tag-security","product-sdk-net"],"acf":{"authors":[{"ID":357152,"user_firstname":"Matvei","user_lastname":"Stefarov","nickname":"Matvei Stefarov","user_nicename":"mstefarov","display_name":"Matvei Stefarov","user_email":"MStefarov@esri.com","user_url":"","user_registered":"2024-05-08 05:27:12","user_description":"Matvei is a principal software engineer on ArcGIS Maps SDK (aka ArcGIS Runtime). His current focus is on .NET technologies, authentication, secure software developement, performance optimization, and interoperability with open standards. Before Esri, Matvei worked on aeronautical data management systems and game engines.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/b7de1618f917d36fedefa2f9b1b99f6930dfb66a447e4993e83138b32614b851?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/b7de1618f917d36fedefa2f9b1b99f6930dfb66a447e4993e83138b32614b851?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"short_description":"Learn how to smoothly migrate your ArcGIS Maps SDK for .NET apps to the simplified, secure, and modernized authentication APIs.","flexible_content":[{"acf_fc_layout":"content","content":"<p>In 2024, the ArcGIS Maps SDK for .NET team introduced significant changes to authentication APIs as part of a long-term effort to simplify and align the .NET Maps SDK with other Native Maps SDKs. Key enhancements include:<\/p>\n<ul>\n<li>New credential types that align with common OAuth flows<\/li>\n<li>Server certificate validation callbacks for all platforms<\/li>\n<li>HTTP request\/response interceptors for improved monitoring and debugging<\/li>\n<li>JSON-based credential persistence<\/li>\n<li>Deprecation of legacy APIs that accumulated complexity over time<\/li>\n<\/ul>\n<p>This blog post will guide you through the transition, highlighting new capabilities, outlining clear paths from deprecated APIs, and providing practical code examples to help you implement these changes quickly and confidently.<\/p>\n<h2>New Credential Types<\/h2>\n<p>Let\u2019s start by exploring the new credential types that form the foundation of the updated authentication system.<\/p>\n<h3>OAuthUserCredential (200.6+)<\/h3>\n<p>This replaces <strong>OAuthTokenCredential<\/strong>s of type <strong>OAuthAuthorizationCode<\/strong>.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthUserCredential.html\">OAuthUserCredential<\/a> implements <a href=\"https:\/\/developers.arcgis.com\/documentation\/security-and-authentication\/user-authentication\/flows\/authorization-code-with-pkce\/\">user authentication<\/a> using OAuth \u201cauthorization code\u201d flow with PKCE. This is the recommended approach for authenticating end users, providing extra security compared to other methods.<\/p>\n<p>When a user signs in to your application with their ArcGIS account, a token is generated that authorizes your app to access services and content on their behalf. The available resources and functionality depend on the user\u2019s ArcGIS account type, roles, and privileges.<\/p>\n<p>To implement this authentication flow, you need to:<\/p>\n<ul>\n<li>1) Create an <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthUserConfiguration.html\">OAuthUserConfiguration<\/a> that specifies your OAuth client ID, redirect URL, and optional parameters.<\/li>\n<li>2) Implement an <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.IOAuthAuthorizeHandler.html\">IOAuthAuthorizeHandler<\/a> to launch a web browser for user sign-in and receive the authorization code.<\/li>\n<\/ul>\n<p>Our <a href=\"https:\/\/developers.arcgis.com\/net\/security-and-authentication\/tutorials\/access-services-with-oauth-2-0\/\">Access services with OAuth credentials<\/a> tutorial provides a complete implementation example.<\/p>\n<h3>OAuthAppCredential (200.5+)<\/h3>\n<p>This replaces <strong>OAuthTokenCredential<\/strong>s of type <strong>OAuthClientCredentials<\/strong>.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthApplicationCredential.html\">OAuthApplicationCredential<\/a> implements <a href=\"https:\/\/developers.arcgis.com\/documentation\/security-and-authentication\/types-of-authentication\/#app-authentication\">app authentication<\/a> using OAuth \u201cclient credentials\u201d flow. Use this to create applications that do not require users to sign in, but still need access to token-secured resources and services.<\/p>\n<p>With this approach, requests are made using the credits and privileges associated with your app\u2019s account rather than an individual user\u2019s account. An app credential is created from a client ID and client secret that have been pre-registered with the portal.<\/p>\n<p>The client secret should be treated as confidential information since it allows direct billing to your developer account. This authentication method is intended for secure environments where credentials cannot be easily exposed to end users. Never include your client secret in publicly distributed applications.<\/p>\n<h3>AccessTokenCredential (200.6+)<\/h3>\n<p>This replaces <strong>ArcGISTokenCredential<\/strong>s created by <strong>GenerateCredentialAsync<\/strong>.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AccessTokenCredential.html\">AccessTokenCredential<\/a> provides an access token for secured ArcGIS content and services. You can obtain this token in several ways:<\/p>\n<ul>\n<li><strong>Username\/Password<\/strong>: Call <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AccessTokenCredential.CreateAsync.html\">CreateAsync<\/a> with a <a href=\"https:\/\/developers.arcgis.com\/documentation\/security-and-authentication\/user-authentication\/flows\/generate-token-flow\/\">username and password<\/a>. Note that this method is less secure than OAuth user authentication as it involves handling plaintext passwords.<\/li>\n<li><strong>Network Security<\/strong>: Call <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AccessTokenCredential.CreateNetworkSecuredAsync.html\">CreateNetworkSecuredAsync<\/a> for services protected by Integrated Windows Authentication (IWA) or client certificate authentication (PKI).<\/li>\n<li><strong>Portal Federation<\/strong>: Tokens can be automatically generated for federated services after signing into the owning portal.<\/li>\n<\/ul>\n<p>Our <a href=\"https:\/\/developers.arcgis.com\/net\/wpf\/sample-code\/arcgis-token-challenge\/\">ArcGIS token challenge sample<\/a> shows how to create this credential in response to an authentication challenge. You can also create and <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AuthenticationManager.AddCredential.html\">add a credential to the AuthenticationManager<\/a> before accessing secured services.<\/p>\n<h3>PregeneratedTokenCredential (200.5+)<\/h3>\n<p>This replaces <strong>ArcGISTokenCredential<\/strong>s created by the token-string constructor.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.PregeneratedTokenCredential.html\">PregeneratedTokenCredential<\/a> accesses token-secured ArcGIS content and services using an independently generated token. This credential type gives you flexibility when integrating with custom authentication systems. Use it when you:<\/p>\n<ul>\n<li>Handle token generation outside of the Maps SDK<\/li>\n<li>Have an existing authentication system that generates ArcGIS tokens<\/li>\n<li>Need to use tokens provided by a separate backend service<\/li>\n<\/ul>\n<h2>New Supporting APIs<\/h2>\n<p>Beyond the credential types themselves, several supporting APIs have been added to enhance flexibility and control.<\/p>\n<h3>Server Certificate Validation (200.6+)<\/h3>\n<p>When working with HTTPS services, you can now customize how SSL\/TLS certificates are validated. Specify a custom callback when <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Http.HttpConfigurationExtensions.ConfigureHttp.html\">configuring HTTP settings<\/a> to examine all SSL connections made by the Maps SDK.<\/p>\n<p>Server certificates are usually validated by the operating system using default policies and known Certificate Authorities, but your own validator can accept or reject connections based on custom criteria. For example:<\/p>\n<ul>\n<li>Accept server credentials that would otherwise be rejected by the system (useful for development servers, proxies, or self-signed certificates).<\/li>\n<li>Reject credentials that would otherwise be accepted by the system, enabling certificate pinning.<\/li>\n<\/ul>\n<p>The callback uses the standard .NET <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.net.security.remotecertificatevalidationcallback?view=netstandard-2.0\">RemoteCertificateValidationCallback<\/a> signature. For more information including code examples, see <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/core\/extensions\/sslstream-best-practices#custom-x509certificate-validation\">Microsoft\u2019s guide to custom X509Certificate validation<\/a>.<\/p>\n<h3>IHttpMessageInterceptor (200.5+)<\/h3>\n<p>The new <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Http.IHttpMessageInterceptor.html\">IHttpMessageInterceptor<\/a> interface allows you to monitor, modify, or even mock HTTP requests and responses. This powerful capability can be configured globally when <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Http.HttpConfigurationExtensions.ConfigureHttp.html\">configuring HTTP settings<\/a> on startup. Common use cases include:<\/p>\n<p><strong>Logging and Diagnostics<\/strong>: Log request and response details for monitoring and debugging:<\/p>\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\"><span style=\"color: #444444;font-weight: bold\">public<\/span> <span style=\"color: #444444;font-weight: bold\">class<\/span> <span style=\"color: #880000;font-weight: bold\">LoggingHttpInterceptor<\/span> : <span style=\"color: #880000;font-weight: bold\">IHttpMessageInterceptor<\/span>\r\n{\r\n    <span style=\"color: #444444;font-weight: 400\"><span style=\"color: #444444;font-weight: bold\">public<\/span> <span style=\"color: #444444;font-weight: bold\">async<\/span> Task <span style=\"color: #880000;font-weight: bold\">SendAsync<\/span>(<span style=\"color: #444444;font-weight: 400\">HttpMessageInvoker invoker, HttpRequestMessage message, CancellationToken cancellationToken<\/span>)<\/span>\r\n    {\r\n        <span style=\"color: #697070;font-weight: 400\">\/\/ Log the outgoing request details.<\/span>\r\n        Console.WriteLine(<span style=\"color: #880000;font-weight: 400\">$\"Request: <span style=\"color: #880000;font-weight: 400\">{message.Method}<\/span> <span style=\"color: #880000;font-weight: 400\">{message.RequestUri}<\/span>\"<\/span>);\r\n\r\n        <span style=\"color: #697070;font-weight: 400\">\/\/ Execute the request, with a timer<\/span>\r\n        Stopwatch stopwatch = Stopwatch.StartNew();\r\n        HttpResponseMessage response = <span style=\"color: #444444;font-weight: bold\">await<\/span> invoker.SendAsync(message, cancellationToken);\r\n        stopwatch.Stop();\r\n\r\n        <span style=\"color: #697070;font-weight: 400\">\/\/ Log the response details along with the elapsed time.<\/span>\r\n        Console.WriteLine(<span style=\"color: #880000;font-weight: 400\">$\"Response: <span style=\"color: #880000;font-weight: 400\">{(<span style=\"color: #397300;font-weight: 400\">int<\/span>)response.StatusCode}<\/span> <span style=\"color: #880000;font-weight: 400\">{response.ReasonPhrase}<\/span>, Elapsed Time: <span style=\"color: #880000;font-weight: 400\">{stopwatch.ElapsedMilliseconds}<\/span> ms\"<\/span>);\r\n        <span style=\"color: #444444;font-weight: bold\">return<\/span> response;\r\n    }\r\n}<\/pre>\n<p><strong>Custom Headers<\/strong>: Modify headers in requests or responses to improve compatibility with specific services:<\/p>\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\"><span style=\"color: #444444;font-weight: bold\">public<\/span> <span style=\"color: #444444;font-weight: bold\">class<\/span> <span style=\"color: #880000;font-weight: bold\">CustomHeaderInterceptor<\/span> : <span style=\"color: #880000;font-weight: bold\">IHttpMessageInterceptor<\/span>\r\n{\r\n    <span style=\"color: #444444;font-weight: 400\"><span style=\"color: #444444;font-weight: bold\">public<\/span> Task <span style=\"color: #880000;font-weight: bold\">SendAsync<\/span>(<span style=\"color: #444444;font-weight: 400\">HttpMessageInvoker invoker, HttpRequestMessage message, CancellationToken cancellationToken<\/span>)<\/span>\r\n    {\r\n        <span style=\"color: #444444;font-weight: bold\">if<\/span> (message.RequestUri?.Host == <span style=\"color: #880000;font-weight: 400\">\"mydomain.com\"<\/span>)\r\n        {\r\n            <span style=\"color: #697070;font-weight: 400\">\/\/ Add an extra request header for this domain only<\/span>\r\n            message.Headers.Add(<span style=\"color: #880000;font-weight: 400\">\"X-CustomHeader\"<\/span>, <span style=\"color: #880000;font-weight: 400\">\"myHeaderValue\"<\/span>);\r\n        }\r\n        <span style=\"color: #444444;font-weight: bold\">return<\/span> invoker.SendAsync(message, cancellationToken);\r\n    }\r\n}<\/pre>\n<p><strong>Mock Responses for Testing<\/strong>: Intercept requests and send mock responses instead of using live services:<\/p>\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\"><span style=\"color: #444444;font-weight: bold\">public<\/span> <span style=\"color: #444444;font-weight: bold\">class<\/span> <span style=\"color: #880000;font-weight: bold\">DictionaryMockHttpInterceptor<\/span> : <span style=\"color: #880000;font-weight: bold\">IHttpMessageInterceptor<\/span>\r\n{\r\n    <span style=\"color: #697070;font-weight: 400\">\/\/ Map known URLs to string responses.<\/span>\r\n    <span style=\"color: #444444;font-weight: bold\">private<\/span> <span style=\"color: #444444;font-weight: bold\">readonly<\/span> Dictionary&lt;<span style=\"color: #397300;font-weight: 400\">string<\/span>, <span style=\"color: #397300;font-weight: 400\">string<\/span>&gt; _mockResponses = <span style=\"color: #444444;font-weight: bold\">new<\/span> Dictionary&lt;<span style=\"color: #397300;font-weight: 400\">string<\/span>, <span style=\"color: #397300;font-weight: 400\">string<\/span>&gt;\r\n    {\r\n        { <span style=\"color: #880000;font-weight: 400\">\"http:\/\/example.com\/api\/test\"<\/span>, <span style=\"color: #880000;font-weight: 400\">\"{\\\"result\\\":\\\"Test successful\\\"}\"<\/span> },\r\n        { <span style=\"color: #880000;font-weight: 400\">\"http:\/\/example.com\/api\/error\"<\/span>, <span style=\"color: #880000;font-weight: 400\">\"{\\\"error\\\":\\\"Something went wrong\\\"}\"<\/span> }\r\n    };\r\n\r\n    <span style=\"color: #444444;font-weight: 400\"><span style=\"color: #444444;font-weight: bold\">public<\/span> Task <span style=\"color: #880000;font-weight: bold\">SendAsync<\/span>(<span style=\"color: #444444;font-weight: 400\">HttpMessageInvoker invoker, HttpRequestMessage message, CancellationToken cancellationToken<\/span>)<\/span>\r\n    {\r\n        <span style=\"color: #444444;font-weight: bold\">if<\/span> (message.RequestUri != <span style=\"color: #669955;font-weight: 400\">null<\/span> &amp;&amp; _mockResponses.TryGetValue(message.RequestUri.AbsoluteUri, <span style=\"color: #444444;font-weight: bold\">out<\/span> <span style=\"color: #444444;font-weight: bold\">var<\/span> responseContent))\r\n        {\r\n            <span style=\"color: #444444;font-weight: bold\">var<\/span> response = <span style=\"color: #444444;font-weight: bold\">new<\/span> HttpResponseMessage(HttpStatusCode.OK)\r\n            {\r\n                Content = <span style=\"color: #444444;font-weight: bold\">new<\/span> StringContent(responseContent, System.Text.Encoding.UTF8, <span style=\"color: #880000;font-weight: 400\">\"application\/json\"<\/span>)\r\n            };\r\n            <span style=\"color: #444444;font-weight: bold\">return<\/span> Task.FromResult(response);\r\n        }\r\n\r\n        <span style=\"color: #697070;font-weight: 400\">\/\/ If no mock response is found, proceed with the actual HTTP call.<\/span>\r\n        <span style=\"color: #444444;font-weight: bold\">return<\/span> invoker.SendAsync(message, cancellationToken);\r\n    }\r\n}<\/pre>\n<h3>Credential.ToJson\/FromJson (200.5+)<\/h3>\n<p>Persisting credentials reduces the need for users to repeatedly authenticate, creating a smoother experience across application sessions. For most platforms we provide a ready-to-use implementation via <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.CredentialPersistence.CreateDefaultAsync.html\">CredentialPersistence.CreateDefaultAsync<\/a> that securely stores credentials using platform-specific mechanisms. But for those who handle persistence themselves, we\u2019ve added <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.Credential.ToJson.html\">Credential.ToJson<\/a> and <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.Credential.FromJson.html\">Credential.FromJson(string)<\/a> methods to make this easier. These JSON-based methods have several advantages over the previous ISerializable-based approach:<\/p>\n<ul>\n<li>Consistent API across all .NET platforms (MAUI, WPF, UWP)<\/li>\n<li>Better compatibility between SDK updates<\/li>\n<li>Simplified format that\u2019s easier to debug and inspect<\/li>\n<\/ul>\n<h2>Migration Guidance<\/h2>\n<p>Now that you understand the new authentication components, let\u2019s look at practical steps for migrating existing code.<\/p>\n<h3>Token Authentication<\/h3>\n<p>If your app uses <strong>TokenCredential<\/strong> to access token-secured ArcGIS resources, you should replace it with one of the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.ArcGISCredential.html\">ArcGISCredential<\/a> implementations described above.<\/p>\n<p>Instead of generating credentials using <strong>AuthenticationManager.GenerateCredentialAsync<\/strong> with <strong>GenerateTokenOptions<\/strong>, use one of these factory methods:<\/p>\n<ul>\n<li>For username and password authentication: <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AccessTokenCredential.CreateAsync.html\">AccessTokenCredential.CreateAsync<\/a><\/li>\n<li>For network-secured services (IWA, PKI): <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AccessTokenCredential.CreateNetworkSecuredAsync.html\">AccessTokenCredential.CreateNetworkSecuredAsync<\/a><\/li>\n<li>For app authentication: <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthApplicationCredential.CreateAsync.html\">OAuthApplicationCredential.CreateAsync<\/a><\/li>\n<li>For user authentication: <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthUserCredential.CreateAsync.html\">OAuthUserCredential.CreateAsync<\/a><\/li>\n<\/ul>\n<p>If you were handling token generation yourself and constructing an <strong>ArcGISTokenCredential<\/strong> with a token string, construct a <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.PregeneratedTokenCredential.html\">PregeneratedTokenCredential<\/a> instead.<\/p>\n<p>If your app relied on OAuth Implicit flow (<code>TokenAuthenticationType.OAuthImplicit<\/code>), you should switch to a different flow. The \u201cimplicit\u201d flow has been <a href=\"https:\/\/developers.arcgis.com\/documentation\/security-and-authentication\/user-authentication\/flows\/implicit-flow\/\">deprecated across the ArcGIS Platform<\/a>, and support will be removed in the next major release of the Maps SDK.<\/p>\n<h3>Configuring OAuth<\/h3>\n<p>If your app registered a <strong>ServerInfo<\/strong> to configure authentication, migrate to the new APIs as follows:<\/p>\n<p>For <em>OAuth user<\/em> authentication, create an <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthUserConfiguration.html\">OAuthUserConfiguration<\/a> instead of ServerInfo:<\/p>\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\"><span style=\"color: #697070;font-weight: 400\">\/\/ Old deprecated way:<\/span>\r\nAuthenticationManager.Current.RegisterServer(<span style=\"color: #444444;font-weight: bold\">new<\/span> ServerInfo(<span style=\"color: #880000;font-weight: 400\">\"http:\/\/myserver.com\/portal\/sharing\/\"<\/span>)\r\n{\r\n    TokenAuthenticationType = TokenAuthenticationType.OAuthAuthorizationCode,\r\n    OAuthClientInfo = <span style=\"color: #444444;font-weight: bold\">new<\/span> OAuthClientInfo(<span style=\"color: #880000;font-weight: 400\">\"MyClientID\"<\/span>, <span style=\"color: #669955;font-weight: 400\">null<\/span>),\r\n});\r\n\r\n<span style=\"color: #697070;font-weight: 400\">\/\/ New recommended way:<\/span>\r\n<span style=\"color: #444444;font-weight: bold\">var<\/span> myOAuthConfig = <span style=\"color: #444444;font-weight: bold\">new<\/span> OAuthUserConfiguration(<span style=\"color: #880000;font-weight: 400\">\"http:\/\/myserver.com\/portal\"<\/span>, <span style=\"color: #880000;font-weight: 400\">\"MyClientID\"<\/span>, myRedirectUrl);<\/pre>\n<p>After creating the configuration, you have three options:<\/p>\n<ul>\n<li>1) Create a credential immediately:\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\"><span style=\"color: #444444;font-weight: bold\">var<\/span> credential = <span style=\"color: #444444;font-weight: bold\">await<\/span> OAuthUserCredential.CreateAsync(myOAuthConfig);\r\nAuthenticationManager.Current.AddCredential(credential);<\/pre>\n<\/li>\n<li>2) Let the SDK generate the credential when needed (bypassing the ChallengeHandler) using the fluent configuration API:\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\">ArcGISRuntimeEnvironment.Initialize(config =&gt;\r\n{\r\n    config.ConfigureAuthentication(authConfig =&gt;\r\n    {\r\n        authConfig.AddOAuthUserConfiguration(myOAuthConfig);\r\n    });\r\n});<\/pre>\n<\/li>\n<li>3) Let the SDK generate the credential when needed by adding to <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.AuthenticationManager.OAuthUserConfigurations.html\">AuthenticationManager.OAuthUserConfigurations<\/a>:\n<pre style=\"font-family: monospace;color: #444444;background-color: #f3f3f3;font-weight: 400;font-size: 14px;padding:10px\">AuthenticationManager.Current.OAuthUserConfigurations.Add(myOAuthConfig);\r\nAuthenticationManager.Current.OAuthAuthorizeHandler = myAuthorizeHandler;<\/pre>\n<\/li>\n<\/ul>\n<p>For <em>OAuth app<\/em> authentication, pass client ID and client secret directly to <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.OAuthApplicationCredential.CreateAsync.html\">OAuthApplicationCredential.CreateAsync<\/a>.<\/p>\n<p>If you currently use <strong>ArcGISHttpClientHandler.DefaultReferer<\/strong> or <strong>GenerateTokenOptions.Referer<\/strong> to specify a referrer, use <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Http.HttpConfigurationExtensions.UseDefaultReferer.html\">UseDefaultReferer<\/a> in the fluent configuration API instead.<\/p>\n<h3>Credential URLs<\/h3>\n<p>Starting with version 200.7.0, Credential\u2019s <strong>ServiceUri<\/strong> property will be deprecated in favor of <strong>ServerContext<\/strong>, which provides a more reliable URL for matching credentials with network requests.<\/p>\n<p>ServiceUri preserves the original URL from the time of creation, often including unnecessary details from the ChallengeHandler like item IDs or query parameters. In contrast, ServerContext provides a normalized base URL that reflects how credentials are actually matched to requests:<\/p>\n<ul>\n<li>For CertificateCredential and ProxyCredential: normalized hostname and port<\/li>\n<li>For NetworkCredential: normalized hostname, port, and path (allowing multiple realms on one server)<\/li>\n<li>For ArcGISCredential: normalized hostname, port, and part of the path up to but not including <code>\/rest<\/code>.<\/li>\n<\/ul>\n<p>This change doesn\u2019t affect how credentials are matched internally, but if your code specifically checks the ServiceUri property, consider using ServerContext instead.<\/p>\n<h3>Using Maps SDK\u2019s Network Stack for Your Own Requests<\/h3>\n<p>To make requests using Maps SDK\u2019s network stack, taking advantage of its authentication and caching features, use <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Http.ArcGISHttpMessageHandler.html\">ArcGISHttpMessageHandler<\/a> instead of the deprecated <strong>ArcGISHttpClientHandler<\/strong>. This provides the same functionality with better performance and improved challenge detection.<\/p>\n<h3>Request Logging and Interception<\/h3>\n<p>If you were using ArcGISHttpClientHandler\u2019s global <strong>HttpRequestBegin<\/strong> and <strong>HttpRequestEnd<\/strong> events, replace them with the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Http.IHttpMessageInterceptor.html\">IHttpMessageInterceptor<\/a> interface described earlier.<\/p>\n<h3>Persisting Credentials<\/h3>\n<p>The ISerializable support for Credentials is being deprecated in line with Microsoft\u2019s effort to <a href=\"https:\/\/github.com\/dotnet\/docs\/issues\/34893\">phase out legacy serialization<\/a> in .NET.<\/p>\n<p>We\u2019ve already updated the default <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Security.CredentialPersistence.html\">CredentialPersistence<\/a> implementations to use FromJson\/ToJson instead of DataContractSerializer. If your app implements custom credential storage, we recommend that you do the same.<\/p>\n<h3>Obtaining and Refreshing Tokens<\/h3>\n<p>If your app needs to know the token value or expiration, cast it to a specific subclass of ArcGISCredential and use either the async GetTokenInfoAsync method or the TokenInfo property. Calling GetTokenInfoAsync refreshes the token as needed, so the new credentials do not include a RefreshAsync() method.<\/p>\n<h2>Summary<\/h2>\n<p>Migrating to the new authentication system in the Native Maps SDK for .NET is essential to ensure your applications remain secure and up-to-date. By following the guidance provided in this post, you can take advantage of the new capabilities, streamline your authentication processes, and prepare for future updates. While deprecated APIs will continue working in 200.x releases of ArcGIS Maps SDK for .NET, they will be <strong>removed in the next major release (300.x)<\/strong>.<\/p>\n<p>To ensure a smooth transition, enable deprecation warnings in your build process to identify usage of outdated APIs early, and implement changes incrementally with thorough testing. Our <a href=\"https:\/\/developers.arcgis.com\/net\/security-and-authentication\/\">documentation<\/a> provides additional examples and tutorials to guide you through specific scenarios. If you encounter challenges during migration, reach out through <a href=\"https:\/\/community.esri.com\/t5\/net-maps-sdk-questions\/bd-p\/arcgis-runtime-sdk-dotnet-questions\">Esri Community<\/a> or through <a href=\"https:\/\/support.esri.com\/en-us\/products\/arcgis-maps-sdk-for-net\">technical support<\/a>.<\/p>\n<p>Lastly, we\u2019ve provided a quick reference guide below for authentication flow replacements. Happy migrating!<\/p>\n<h3>Quick Reference Guide<\/h3>\n<p><strong>Authentication Flow Replacements<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Use case<\/th>\n<th>Legacy APIs<\/th>\n<th>New Replacement<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>OAuth user authentication<\/td>\n<td><code>OAuthTokenCredential<\/code><\/td>\n<td><code>OAuthUserCredential<\/code><\/td>\n<\/tr>\n<tr>\n<td>OAuth app authentication<\/td>\n<td><code>OAuthTokenCredential<\/code><\/td>\n<td><code>OAuthAppCredential<\/code><\/td>\n<\/tr>\n<tr>\n<td>Username + password login<\/td>\n<td><code>GenerateCredentialAsync<\/code><\/td>\n<td><code>AccessTokenCredential<\/code><\/td>\n<\/tr>\n<tr>\n<td>Manually generated tokens<\/td>\n<td><code>ArcGISTokenCredential<\/code><\/td>\n<td><code>PregeneratedTokenCredential<\/code><\/td>\n<\/tr>\n<tr>\n<td>OAuth implicit flow<\/td>\n<td><code>GenerateCredentialAsync<\/code> + <code>TokenAuthenticationType.OAuthImplicit<\/code><\/td>\n<td>Switch to authorization code flow<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Configuration Replacements<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Use case<\/th>\n<th>Legacy API<\/th>\n<th>New Replacement<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Set up user authentication<\/td>\n<td><code>ServerInfo<\/code> + <code>OAuthClientInfo<\/code><\/td>\n<td><code>OAuthUserConfiguration<\/code><\/td>\n<\/tr>\n<tr>\n<td>Pick token type<\/td>\n<td><code>TokenAuthenticationType<\/code><\/td>\n<td>Use a specific subclass of ArcGISCredential<\/td>\n<\/tr>\n<tr>\n<td>Specify a referrer<\/td>\n<td><code>ArcGISHttpClientHandler.DefaultReferer<\/code> or <code>GenerateTokenOptions.Referer<\/code><\/td>\n<td><code>IArcGISHttpConfiguration.UseDefaultReferer<\/code><\/td>\n<\/tr>\n<tr>\n<td>Check credential&#8217;s URL<\/td>\n<td><code>Credential.ServiceUri<\/code><\/td>\n<td><code>Credential.ServerContext<\/code> (200.7+)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Miscellaneous Replacements<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Use case<\/th>\n<th>Legacy API<\/th>\n<th>New Replacement<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Make HTTP requests<\/td>\n<td><code>ArcGISHttpClientHandler<\/code><\/td>\n<td><code>ArcGISHttpMessageHandler<\/code><\/td>\n<\/tr>\n<tr>\n<td>Intercept HTTP requests<\/td>\n<td><code>HttpRequestBegin\/End<\/code> events<\/td>\n<td><code>IHttpMessageInterceptor<\/code><\/td>\n<\/tr>\n<tr>\n<td>Persist credentials<\/td>\n<td><code>ISerializable<\/code><\/td>\n<td><code>Credential.ToJson<\/code> + <code>Credential.FromJson<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n"}],"related_articles":"","show_article_image":true,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/03\/small_banner.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/03\/blog_img__big_banner.png"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET<\/title>\n<meta name=\"description\" content=\"Step-by-step migration guidance, practical code examples, and insights into powerful new authentication features in ArcGIS Maps SDK for .NET\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET\" \/>\n<meta property=\"og:description\" content=\"Step-by-step migration guidance, practical code examples, and insights into powerful new authentication features in ArcGIS Maps SDK for .NET\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-10T17:51:52+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\"},\"author\":{\"name\":\"Matvei Stefarov\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1e763d08e3e9a31fa45b739140b1444e\"},\"headline\":\"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET\",\"datePublished\":\"2025-03-10T16:30:18+00:00\",\"dateModified\":\"2025-03-10T17:51:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\"},\"wordCount\":14,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"App Development\",\"authentication\",\"HTTPS\",\"OAuth\",\"Security\"],\"articleSection\":[\"Developers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\",\"name\":\"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2025-03-10T16:30:18+00:00\",\"dateModified\":\"2025-03-10T17:51:52+00:00\",\"description\":\"Step-by-step migration guidance, practical code examples, and insights into powerful new authentication features in ArcGIS Maps SDK for .NET\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1e763d08e3e9a31fa45b739140b1444e\",\"name\":\"Matvei Stefarov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b7de1618f917d36fedefa2f9b1b99f6930dfb66a447e4993e83138b32614b851?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b7de1618f917d36fedefa2f9b1b99f6930dfb66a447e4993e83138b32614b851?s=96&d=blank&r=g\",\"caption\":\"Matvei Stefarov\"},\"description\":\"Matvei is a principal software engineer on ArcGIS Maps SDK (aka ArcGIS Runtime). His current focus is on .NET technologies, authentication, secure software developement, performance optimization, and interoperability with open standards. Before Esri, Matvei worked on aeronautical data management systems and game engines.\",\"worksFor\":\"Esri\",\"url\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET","description":"Step-by-step migration guidance, practical code examples, and insights into powerful new authentication features in ArcGIS Maps SDK for .NET","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk","og_locale":"en_US","og_type":"article","og_title":"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET","og_description":"Step-by-step migration guidance, practical code examples, and insights into powerful new authentication features in ArcGIS Maps SDK for .NET","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2025-03-10T17:51:52+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk"},"author":{"name":"Matvei Stefarov","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1e763d08e3e9a31fa45b739140b1444e"},"headline":"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET","datePublished":"2025-03-10T16:30:18+00:00","dateModified":"2025-03-10T17:51:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk"},"wordCount":14,"commentCount":0,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["App Development","authentication","HTTPS","OAuth","Security"],"articleSection":["Developers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk","name":"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2025-03-10T16:30:18+00:00","dateModified":"2025-03-10T17:51:52+00:00","description":"Step-by-step migration guidance, practical code examples, and insights into powerful new authentication features in ArcGIS Maps SDK for .NET","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/new-auth-apis-for-dotnet-sdk#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"How to Migrate to the New Authentication System in ArcGIS Maps SDK for .NET"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1e763d08e3e9a31fa45b739140b1444e","name":"Matvei Stefarov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b7de1618f917d36fedefa2f9b1b99f6930dfb66a447e4993e83138b32614b851?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b7de1618f917d36fedefa2f9b1b99f6930dfb66a447e4993e83138b32614b851?s=96&d=blank&r=g","caption":"Matvei Stefarov"},"description":"Matvei is a principal software engineer on ArcGIS Maps SDK (aka ArcGIS Runtime). His current focus is on .NET technologies, authentication, secure software developement, performance optimization, and interoperability with open standards. Before Esri, Matvei worked on aeronautical data management systems and game engines.","worksFor":"Esri","url":""}]}},"text_date":"March 10, 2025","author_name":"Matvei Stefarov","author_page":false,"custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/03\/blog_img__big_banner.png","primary_product":"ArcGIS Maps SDK for .NET","tag_data":[{"term_id":758502,"name":"App Development","slug":"app-development","term_group":0,"term_taxonomy_id":758502,"taxonomy":"post_tag","description":"","parent":0,"count":7,"filter":"raw"},{"term_id":764502,"name":"authentication","slug":"authentication","term_group":0,"term_taxonomy_id":764502,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"},{"term_id":24941,"name":"HTTPS","slug":"https","term_group":0,"term_taxonomy_id":24941,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"},{"term_id":777722,"name":"OAuth","slug":"oauth","term_group":0,"term_taxonomy_id":777722,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":24071,"name":"Security","slug":"security","term_group":0,"term_taxonomy_id":24071,"taxonomy":"post_tag","description":"","parent":0,"count":124,"filter":"raw"}],"category_data":[{"term_id":738191,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":738191,"taxonomy":"category","description":"","parent":0,"count":421,"filter":"raw"}],"product_data":[{"term_id":769142,"name":"ArcGIS Maps SDK for .NET","slug":"sdk-net","term_group":0,"term_taxonomy_id":769142,"taxonomy":"product","description":"","parent":36601,"count":39,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=sdk-net","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2715362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/357152"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2715362"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2715362\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2715362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2715362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2715362"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2715362"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2715362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}