2
Retrieving Passwords Not Working Per API Documentation
Problem reported by John C. Reid - 3/21/2022 at 2:46 PM
Submitted
We have a solution that allows us to pull a list of alias emails and their target email(s). Right now I have to manually put in the domain, domain admin email and email password. Trying to take this solution to the next level and allow for selecting the domain on a user input. 
From what I see I can only retrieve the list as a domain admin. With over 300 domains, I can't store all the user/passwords for each domain's domain admin off line, so I need to retrieve the one I need with the API. 
From what I see in the docs, I would need to use:
https://domain.com/api/v1/settings/sysadmin/user/domainadmin@'.$searchDomain
However, the password is not in the returned data - even though the API Docs say it should be. Help!

2 Replies

Reply to Thread
0
Tony Scholz Replied
Employee Post
Hello John, 

You can set this up as a loop to grab all the users from all the domains. As an example. What you will need to do is to impersonate a domain admin. Using this you can get a list of users on that domain. Once you have this list you can loop over it calling the show-password API to grab the passwords. You can increase the loop if needed to loop over all domains. This would all be done using the system admin user and password that are is setup to use your API. 


let me know if this helps. 

Thank you
Tony
Tony Scholz System/Network Administrator SmarterTools Inc. www.smartertools.com
0
John C. Reid Replied
Thanks Tony. The incorrect API docs were what was hanging me up. Your solution (off line) of using the impersonate function solved the problem of needing the password.
Please update the API docs to reflect that password is no longer returned with the /sysadmin/user call.

Reply to Thread