I am using OKTA Api where I want to get the groups. There are currently close to 50k groups and the API is making a request and pulling in 10k groups. While the api limit is 1000? Which is weird, maybe I was provided 10k request, who knows. Anyways how can I iterate through all the groups. I am using the Okta python SDK.
Here is my code:
import okta
from okta.framework.Utils import Utils
from okta.models.usergroup import UserGroup, UserGroupProfile
okta_url = "testurl.com
api_key = "apikey"
groups_client = okta.UserGroupsClient(okta_url, api_key)
groups = groups_client.get_groups(query=None, limit= 10000)
for i in groups:
print(("Group Name: {}".format(i.profile.name)) + (" Group ID: {}".format(i.id)))
The result is
Group Name: group1 Group ID: 00abcdef
Group Name: group2 Group ID: 00fedcba
Group Name: group3 Group ID: 00defabc
...
I would like the results to print all 50k instead of printing 10k because of the API limiting. I believe a for loop might do the trick, just not sure.
Any help is greatly appreciated :D