I’m trying to use Okta’s SDK for Python when creating a new user from an Excel sheet I go through.
After reading all of the user’s fields from Excel, I want to add the user in the Staged
user status. That being said, going through the SDK’s source code it seems like the current function of models.CreateUserRequest
does not contain the activate
field.
async def create_user(user_info):
# Create User Profile and CreateUser Request
user_profile = models.UserProfile()
user_profile.first_name = user_info.first_name
user_profile.last_name = user_info.last_name
user_profile.email = user_info.email
user_profile.login = user_info.login
create_user_req = models.CreateUserRequest({
'activate': False,
'profile': user_profile,
})
# Create User
user, resp, err = await client.create_user(create_user_req)
response_body = resp.get_body()
[...]
Is there a possible way to achieve that?