Invalid token (498) from Portal for ArcGIS with oauth2 app login

06-27-2018 08:04 AM
Occasional Contributor III

I am trying to implement oauth2 app login with Portal for ArcGIS 10.6 and private services.

I have a ArcGIS Server hosting these services and it is federated with the Portal.

I enetered my portal with my (unique) admin user.

I created a new Web Mapping App and then registered my app URIs.

I noted down the clientID and secretID.

When I try to access a private service from this same portal, I then do via POST (everything inside <> is just for privacy obviously):

I get the token succesfully in the response and so I do:

identity-manager:not-authorized You are currently signed in as: 'undefined'. You do not have access to this resource:

This causes the app I am using to pops up the Portal window asking for credentials.

What I have been trying so far, with no luck using the proxy provided by Esri (GitHub - Esri/resource-proxy: Proxy files for DotNet, Java and PHP. )

The proxy.config I am using is:

<?xml version="1.0" encoding="utf-8"?>

<ProxyConfig allowedReferers="*" mustMatch="true" xmlns="proxy.xsd">


    <serverUrl url="" matchAll="true" xmlns="proxy.xsd" />

    <serverUrl url="" clientId="MY_CLIENT_ID" clientSecret="MY_SECRET_ID" rateLimit="600" rateLimitPeriod="60" matchAll="true" oauth2Endpoint=" " xmlns="proxy.xsd" />



Finally, I just noticed in the Limitations of App Login | ArcGIS for Developers  that

  • Tokens obtained by applications can only read public content and services.
  • Tokens obtained by applications may read premium content and services hosted by Esri and consume credits on behalf of the application organization.

If you want to access private content within an organization or content that has been shared with a user, you must use the named user login pattern for authentication.

Does this mean I have to use named login with private services of Portal for ArcGIS?

0 Kudos
2 Replies
Occasional Contributor III

I found this 2014's post with this answer from an Esri person:

In answer to this your application will only be able to read content owned by the same user that created the app.

So it looks that it is possible to use app login in my case.

I do have an app created with the only (admin) user of my portal and I am trying to access private content published on the same portal by the same user.

Can anybody help me solving this issue please?

New Contributor II

Hello Allesandro


I am having the same problem as you.  Have you managed to solve the problem?



0 Kudos