Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Okta Pagination

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on March 6 2020 at 15:12 UTC

Does anyone have an example json that does pagination to import users from Okta? Below is the json I'm trying and it keeps making the import job stick. This same json worked for other rest connectors.

{

"accountParams": {

"connection": "acctAuth",

"processingType": "SequentialAndIterative",

"call": {

"call1": {

"callOrder": 0,

"stageNumber": 0,

"http": {

"url": "https://.okta.com/api/v1/users?100",

"httpContentType": "application/json",

"httpMethod": "GET",

"httpHeaders": {

"Authorization": "${access_token}"

}

},

"listField": "",

"keyField": "accountID",

"colsToPropsMap": {

"accountID": "id~#~char",

"name": "profile.login~#~char",

"displayname": "profile.displayName~#~char",

"customproperty2": "profile.email~#~char",

"customproperty1": "status~#~char"

},

"pagination":{

"nextUrl":{

"nextUrlPath":"${if(headers.Link.split(',')?.length > 1){for(int i=0;i<headers.Link.split(',')?.length;i++){if (headers.Link.split(',')[i].contains('next')){return headers.Link.split(',')[i].replace('<', '').replace('>;rel=\\\"next\\\"','').trim()}}}else{ return ''}}"

}

}

}

}

}

}

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.
2 REPLIES 2

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on March 6 2020 at 22:37 UTC

Hello Gary,


Please find below the sample JSON.


{

"accountParams": {

"connection": "acctAuth",

"processingType": "SequentialAndIterative",

"call": {

"call1": {

"callOrder": 0,

"stageNumber": 0,

"http": {

"url": "https://okta.com/api/v1/users",

"httpHeaders": {

"Authorization": "${access_token}"

},

"httpContentType": "application/x-www-form-urlencoded",

"httpMethod": "GET"

},

"listField": "",

"keyField": "accountID",

"colsToPropsMap": {

"customproperty1": "profile.login~#~char",

"name": "profile.login~#~char",

"accountID": "id~#~char",

"customproperty2": "profile.email~#~char",

"customproperty18": "profile.mobilePhone~#~char",

"customproperty6": "profile.firstName~#~char",

"customproperty9": "profile.lastName~#~char",

"displayname": "profile.displayName~#~char",

"customproperty15": "profile.employeeType~#~char",

"customproperty27": "lastLogin~#~char"

},

"pagination": {

"nextUrl": {

"nextUrlPath": "${(headers.Link?.contains(','))? headers.Link?.split(',')[1].replace('<', '').replace('>; rel=\"next\"','').trim() : ''}"

}

}

}

}

}

}



This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on March 9 2020 at 13:17 UTC

That worked, thank you!

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.