Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | Thrown when a method is called on the wrong Pro thread |
//Find the portal to sign in with using its Uri... var portal = ArcGISPortalManager.Current.GetPortal(new Uri(uri, UriKind.Absolute)); if (!portal.IsSignedOn()) { //Calling "SignIn" will trigger the OAuth popup if your credentials are //not cached (eg from a previous sign in in the session) if (portal.SignIn().success) { //Set this portal as my active portal ArcGISPortalManager.Current.SetActivePortal(portal); } }
var portal = ArcGISPortalManager.Current.GetActivePortal(); //Force login if (!portal.IsSignedOn()) { portal.SignIn(); } var user = portal.GetSignOnUsername();
Target Platforms: Windows 11, Windows 10