https://domain.com/api/v1/settings/sysadmin/user/domainadmin@'.$searchDomain
def impersonate_user(access_info, email): global url authurl = url + "/api/v1/settings/domain/impersonate-user/"+ email # this is the url of the impersonate user function this is adding the email address of the user who you want to impersonate data = requests.post(authurl, headers = {'Authorization': 'Bearer ' + access_info['accessToken']}) # this posts the access token for auth as well as the authurl varable which in turns gives it the email that you want to impeprsonate ImpersonatedUser_Token = data.json()['impersonateAccessToken'] # this is the impersonated user access token ImpersonatedUser_exp = data.json()['impersonateAccessTokenExpiration'] # this is the impersonated user expiration date for the access token. data = {'impersonateAccessToken': ImpersonatedUser_Token, 'impersonateAccessTokenExpiration': ImpersonatedUser_exp} # this is the impersonated user token and expiration date return data # returns the impersonate access token
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add noreply@smartertools.com to your trusted senders list in your email software.