<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z000075XDakCAGOkta Classic EngineAPI Access ManagementAnswered2021-08-05T12:27:47.000Z2021-08-05T07:17:22.000Z2021-08-05T12:27:47.000Z

MohammedZ.06209 (Customer) asked a question.

How to loop through all the pages using list users API

I have the below code but returns only 1st page users, i need to get all the users, please modify this code and help me:

 

function oktaapis() {

 

var API_URL = 'https://abdefg-hub.okta-emea.com//api/v1/users';

var authHeader = "SSWS " + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

 var options = {method: 'GET',contentType: 'application/json',headers: {Authorization: authHeader}}

var response = UrlFetchApp.fetch(API_URL, options)

var data = response.getContentText();

Logger.log(data)

}


This question is closed.
Loading
How to loop through all the pages using list users API