Hi, I want to grab the data of one specific Okta user using the python SDK. The documentation specifies I use get_user(user.profile.login) but it returns a NameError saying name ‘user’ is not defined. I think this is an issue with not defining which user I want to grab? Where would I specify which login I want to use? I want to grab a user’s data by searching their login (first.last)
Here is my code:
config = {
'orgUrl': 'https://censoredforprivacy.okta.com',
'token': os.environ['OKTA_API_TOKEN']
}
okta_client = OktaClient(config)
async def GrabOktaUser(UserLogin):
users, resp, err = await OktaClient.get_user(user.profile.login)
print(resp)
return resp