Select to view content in your preferred language

Portal for ArcGIS: Cannot retrieve token 'expirationDate' on 'portal-self' end point

127
1
a week ago
NicolasGIS
Frequent Contributor

Hello,

I would like to be able to check the expiration date of an access token obtained with OAuth2 code flow.

According to the documentation, I should be able to use the "self" resource and provide a "token about which you want to get information about. This can be any type of token: User Token, App Token, or API Token. The token can be active or expired.Information such as client_id for which the token was generated, developer credentials item id, token's expiration date. This information will be returned in the appInfo response object."

https://developers.arcgis.com/rest/users-groups-and-items/portal-self/#appinfo-response-properties

NicolasGIS_0-1749540255374.png

The problem is that when I browse:

https://organization.example.com/<context>/sharing/rest/portals/self?f=pjson&token=foo&appInfoToken=bar, I get the following reply:

NicolasGIS_1-1749540492840.png

As you can see, on my side, contrary to the example, I get everything but the "expirationDate":

NicolasGIS_2-1749540660630.png

Any idea ?

 

Thanks,

 

Nicolas

 

 

Tags (2)
0 Kudos
1 Reply
NicolasGIS
Frequent Contributor

Support was able to reproduce on 11.5 (I am running 11.3) and could not understand why is the "expirationDate"  missing. So they logged the following BUG:

BUG-000177206: Unable to retrieve the 'expirationDate' token from the 'portal-self' endpoint in the OAuth2 token response.

 

We identified that using an API token, it is displayed on AGOL but not using an OAuth2 token. But the documentation states: "This can be any type of token: User Token, App Token, or API Token"...