AnsweredAssumed Answered

Cannot Generate Identity Credentials for Portal

Question asked by minerjoe Champion on Mar 24, 2016
Latest reply on May 2, 2016 by minerjoe



I am trying to do something (that I think should be) very simple, connect to a Portal from a Runtime application.


However, when I run

TokenCredential credential = await IdentityManager.Current.GenerateCredentialAsync(portalUrl, "username", "password");

An exception is thrown, "The token service URL is not set."


This works fine if I am using a service url

TokenCredential credential = await IdentityManager.Current.GenerateCredentialAsync(serviceUrl, "username", "password");

What I am doing seems to me to be exactly how it is described here Access the ArcGIS platform—ArcGIS Runtime SDK for .NET | ArcGIS for Developers.  But maybe I am missing something.  I also tried connecting to our AGOL account and get the same exception.


What am I missing?