ArcGIS Pro 2.7 API Reference Guide
SetSignonHandler Method (ArcGISSignOn)

ArcGIS.Core.SystemCore Namespace > ArcGISSignOn Class : SetSignonHandler Method
The CoreHost sign on handler
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 10, Windows 8.1

See Also

Reference

ArcGISSignOn Class
ArcGISSignOn Members