
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
How to refresh the access token which is generated by the REST Services ?
As per the document https://www.netiq.com/documentation/identity-manager-developer/rest-api-documentation/idmappsdoc/#/, I have generated the tokens. I can give this token to any third party application to invoke my PRDs. As the access token will expire in sometime, how to refresh it ? I could not find any URI's to refresh the access tokens using the refresh tokens.Need anyone's help here.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Please note I have not tested this so take my post only as general directions, not as a "cook book"! But I think this should work.
When you're getting tokens calling /osp/a/idm/auth/oauth2/grant, you get two tokens (at least based on documentation link you've provided):
- access_token
- refresh_token
Access token is used in Authorization header when making a REST calls to the APIs, but refresh token can be used to get new access token when old one expires.
How to use refresh token to get new access token?
Well, OSP is basically standard OAuth2 authorizatioon server, so basically you need to send refresh token to token endpoint and you'll get new access token.
Hint on how to do this with OSP can be found in Identity governance documentation (probably there are other documents, but this was first returned by google 😊😞
https://www.netiq.com/documentation/identity-governance-35/references/REST-API-Access-Token.pdf
When reading this documentation please keep in mind that you're using OSP, not NAM.
In that documentation you have two sections:
- "Refresh Tokens": general information regarding refresh tokens
- "Access Token Request": How to get new access token from refresh token
When I was reading this PDF I have noticed that there are references to "OAuth 2.0 token endpoint".
For OSP this URL si:
http[s]://[:port]/osp/a/idm/auth/oauth2/token
I hope those directions will help you.
Kind regards
Sebastijan