Troubles with API manage and Create Non-Employee Request

Hello,

I am working on automation in being able to submit Create Non-Employee Request’s via logic apps. When generating a PAT and making it into an access token. Using the v3 API works with the bearer token. However, said token is only good for so long. I can see that it is possible to set up a request token. This is where I am struggling is setting up a request token using the API management. I am not sure if I just have something misconfigured, or maybe my lack of knowledge on how exactly API management works.

Hi Colton Weaver
Greetings for the day!

Kindly find the below process to set up a request token

1.Login to your SailPoint tenant Admin>Global>Security Settings

2.Go to API Management

3.Create New to create New API Client

image

4.Choose Refresh Token

image

  1. You can choose the timeline for expiration as per your requirement.

Thank you!
Dharani.

4 Likes

Dharani,

Thank you for that. But per the authentication documentation, I need to generate the refresh token for the API call to generate it no?

Authentication | SailPoint Developer Community

In order to generate this, I also need a code from the Authorize Code grant? I can run the get command for my tenant in form-encoded, however I am not sure where the response code is located in the response.

Therefore I can not generate the refresh token. Which I would assume the refresh token is what I would then use to call for authentication as a bearer token for the call to create a non-employee request.

Is this the correct process for that? Or am I missing something?

Hi Colton,

Please use below code.

public String getBearerToken(String idnUrl,Map idnHeaders,List allowedstatusIdn){
String idnBearerToken=null;
try {
log.info("-------------------IDN || Generating Bearer Token--------------------------");
String idnTokenResponse = restClient.executePost(idnUrl,idnHeaders,allowedstatusIdn);
Map idnTokenResponseMap =JsonUtil.toMap(idnTokenResponse);
idnBearerToken = idnTokenResponseMap.get("access_token");
}catch(Exception e){
log.error("-----Exception Occured while execting the rule-----"+e);
}
log.info("--------------Bearer Token Generation Complete-----------------------------");
return idnBearerToken;
}
String idnUrl = "Tenant URL/oauth/token?grant_type=client_credentials&client_id=“Client ID”&client_secret=“Client Secret”"

Map idnHeaders = new HashMap();

idnHeaders.put("content-Type","application/json");

List allowedstatusIdn = new ArrayList();

allowedstatusIdn.add("2**");

Thank you!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.