AnsweredAssumed Answered

How to connect to a portal with an enterprise account?

Question asked by m.glasesri-de-esridist Employee on Jun 30, 2017
Latest reply on Jul 1, 2017 by MBranscomb-esristaff

I am familiar with using secured content in AGOL with the ArcGIS Runtime. But we also have an ArcGIS Portal installed in our company. And there we are able to log in with an enterprise account, which in fact is an active directory account.

So, when I use an AGOL account, I initialize credentials in this way:

// use the authentication manager to generate a credential for the portal
var cred = await AuthenticationManager.Current.GenerateCredentialAsync(
    new Uri(agolUrl),
    "MyAgolUserName",
    password);

// add the credential if it was generated successfully
AuthenticationManager.Current.AddCredential(cred);

 

But how to do when using an enterprise account? 

// use the authentication manager to generate a credential for the portal
var cred = await AuthenticationManager.Current.GenerateCredentialAsync(
    new Uri(agolUrl),
    "abc@domain.com",
    password);

// add the credential if it was generated successfully
AuthenticationManager.Current.AddCredential(cred);

The same, if I use "domain.com\abc" instead.

This way I got an error:

You do not have permissions to access this resource or perform this operation.

Outcomes