I'm working on the tutorial "Author, edit, and save maps to your portal" at
I get to the point where I want to save my map in the instruction: "When you click Save Map to Portal, a dialog should appear prompting you to sign in to ArcGIS Online."
I get the following error:
the statements in my C# code that throws this error are ( second line throws the error):
// Indicate the url (portal) to authenticate with (ArcGIS Online)
challengeRequest.ServiceUri = new Uri("https://www.arcgis.com/sharing/rest");
// Call GetCredentialAsync on the AuthenticationManager to invoke the challenge handler
await AuthenticationManager.Current.GetCredentialAsync(challengeRequest, false);
I have properly registered my app and am using my own client ID :
// Client ID for the app registered with the server (Portal Maps)
private const string AppClientId = "XXXXXXXXXXXXX";
In the code, whatever url you are using for the constannt variable
private const string OAuthRedirectUrl = "http://myapps.portalmapapp"; //your ArcGIS online organization url
you need to add the same url in the Redirect Uri of the App's "Registered info". It work for me. Hope that helps.