Select to view content in your preferred language

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

530
3
06-10-2025 12:32 AM
NicolasGIS
Honored 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)
3 Replies
NicolasGIS
Honored 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"...

 

wf_sbakker
New Contributor

I can confirm this issue. I just tried querying information about my token(s) using /sharing/rest/portals/self?, and in both versions 11.5 and 11.4, the expiration date of the token is not shown.

0 Kudos
NicolasGIS
Honored Contributor

Thanks for the confirmation @wf_sbakker. Good to know that you can reproduce... Still do not understand why 4 months later, this BUG is still "In Review" while  obviously it is easily reproductible... 

From my experience, it means this BUG will end up to oblivion and it is annoying 😕

I wonder why do I bother opening BUGs sometimes.

0 Kudos