Hi There - I’ve been recently given access to the API in Okta (for our Org) and I can get a list of users on the web with a url like this one.
https://-admin.okta.com/api/v1/groups/00/users
but when I try to do this through Python, I can create the client object and I am using my api token I’m getting the error:
File “”, line 22, in main
TypeError: ‘NoneType’ object is not iterable
so to me it looks like 2 lines above where I’m calling list_group_users, nothing the variable isn’t getting set. Any reason why this would be?
async def main():
users = []
users_in_group, resp, err = await okta_client.list_group_users('00<our group id>')
while True:
for user in users_in_group: # THIS IS LINE 22
users.append(user)
if resp.has_next():
users_in_group, err = await resp.next()
else:
break;
print(len(users))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())