Hello John,
Thanks for the follow-up. You wouldn't have to store the passwords you could just use our impersonation feature to impersonate the domain admins. Here is an example that I made in python.
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
I was having some trouble making this image readable you could right-click and download it to see it in a bigger view.
Please let me know if this helps.
Kind Regards,
Zach Sylvester
System/Network Administrator
SmarterTools Inc.
(877) 357-6278
www.smartertools.com