ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.SystemCore Namespace / ArcGISSignOn Class / SetSignonHandler Method
The CoreHost sign on handler

In This Topic
    SetSignonHandler Method (ArcGISSignOn)
    In This Topic
    Set your SignOnHandler to receive challenge requests whenever a federated feature service requires authentication. This method is for use in CoreHost applications only.
    Syntax
    public void SetSignonHandler( 
       ISignOnHandler handler
    )
    Public Sub SetSignonHandler( _
       ByVal handler As ISignOnHandler _
    ) 

    Parameters

    handler
    The CoreHost sign on handler
    Exceptions
    ExceptionDescription
    This method is for use in CoreHost applications only
    General system core exception; for example if a conversion combination is not supported.
    Remarks
    Implement a ISignOnHandler to handle authentication requests for federated feature services (that are secured). Within the SignOnHandler, call SignInWithCredentials using the provided portal URI passed in to your callback via the ISignOnHandler.GenerateCredentials callback. It is your responsiblity to provide the relevant username and password for authentication against the portal or arcgis online. Your callback will be invoked anytime the underlying system requires a credential for a portal or online. Note: a feature service db will attempt authentication twice (assuming the first attempt failed).
    To remove your callback handler, set the sign on handler to null, i.e. ArcGISSignOn.Instance.SetSignonHandler(null);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also