AnsweredAssumed Answered

https://www.arcgis.com/sharing/rest error 400

Question asked by LenHannam on May 18, 2017
Latest reply on May 28, 2017 by NYasmin-esristaff

I'm working on the tutorial "Author, edit, and save maps to your portal" at

https://developers.arcgis.com/net/latest/wpf/guide/author-edit-and-save-maps-to-your-portal.htm

 

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:

 

Invalid redirect_uri


Error: 400

 

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";

 

Please help!

 

Thanks,

 

Len Hannam

Outcomes