ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core Namespace / ArcGISPortal Class / SignInWithCredentials Method

In This Topic
    SignInWithCredentials Method (ArcGISPortal)
    In This Topic
    Synchronous method to Sign on to this portal instance. This method must be called from within a QueuedTask or BackgroundTask.
    Syntax
    public SignInResult SignInWithCredentials( 
       string username,
       string password
    )
    Public Function SignInWithCredentials( _
       ByVal username As String, _
       ByVal password As String _
    ) As SignInResult

    Parameters

    username
    password

    Return Value

    A SignInResult containing the SignIn status
    Exceptions
    ExceptionDescription
    Thrown when a method is called on the wrong Pro thread
    username cannot be null
    Remarks
    The addin should provide the correct credentials for the given portal. Unlike SignIn, a thread check _is_ enforced when calling this method. SignInWithCredentials should not be called from the UI thread. Use QueuedTask, ArcGIS.Core.Threading.Tasks.BackgroundTask, or a System.Threading.Tasks.Task.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also