Show / Hide Table of Contents

Method CreateAsync

CreateAsync(Uri, string, string, TimeSpan, CancellationToken)

Creates an OAuthApplicationCredential with information needed to access an ArcGIS resource.

Declaration
public static Task<OAuthApplicationCredential> CreateAsync(Uri portalUrl, string clientId, string clientSecret, TimeSpan tokenExpirationInterval = default, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Uri portalUrl

The URL of the portal to authenticate with.

string clientId

A unique identifier associated with an application registered with the portal that assists with client/server OAuth authentication.

string clientSecret

A private key that verifies the application is authorized to access the registered service.

TimeSpan tokenExpirationInterval

The duration the token will remain valid, represented in minutes. The value must be at least 1 minute, otherwise the server default is used.

CancellationToken cancellationToken

A cancellation token that can be used to cancel the operation.

Returns
Type Description
Task<OAuthApplicationCredential>

Returns an OAuthApplicationCredential.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.5 - 200.8
.NET200.5 - 300.0
.NET Windows200.5 - 300.0
.NET Android200.5 - 300.0
.NET iOS200.5 - 300.0
.NET Framework200.5 - 200.8
UWP200.5 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.