I am moving all of our organizations federatedfeature services to AGOL and now I am trying to prompt the user to login to ArcGIS.com, but want to default in our organization's URL to the login popup that appears when my code runs this
MyPortal = ArcGISPortalManager.Current.GetPortal(new Uri("https://www.arcgis.com"));
if (!MyPortal.IsSignedOn())
{
SignInResult signInResult = MyPortal.SignIn();
}
This code prompts the user for the organizational URL https://myURL.maps.arcgis.com, but i want to default it in there. If I change the GetPortal to my organizational URL https://myURL.maps.arcgis.com but it doesn't work like i need it to. It does log me in, but the maps don't seem to be able to connection to my federated services like when i connect to AGOL and enter my Org URL. Plus, i don't want to entries in my ArcGIS Pro portal list.
Is there a way to enter this in my code.