Kaseya Community

REST API Script with Encrypted Credentials File

This question is not answered

I'm doing some Powershell scripting to pull info from a VSA server from the REST API.

Has anyone had success with pulling username/password from an encrypted credentials file for use with the Kaseya REST API?  The traditional methods aren't working for me. 

All Replies
  • I use the APIs extensively. One thing to note - the PDF document is both outdated and has several errors. I pulled out most of my remaining hair over that! Use the web-based document, which is mostly up-to-date.

    Another challenge is that the documentation around the Get User and Update User calls is inaccurate or incomplete. I have a call with the engineering team next week and this will be one of the topics for review.

    What are you specifically trying to accomplish?

    Glenn

  • I, too, have been experimenting with the REST API and PowerShell. Originally I was using the hash-based authentication method described in the documentation. This worked well until my organization turned on 2FA for our VSA. Although this apparently can work (based on the Swagger UI), I could not find any documentation on how to add 2FA to the authentication process. I had the option of turning off the 2FA for my login or IP, but I didn't want to go that route.

    This led me to start using OAuth for authentication. Although it took a little while to figure out the process, it works like a charm and doesn't rely on a regular username/password that you need to worry about encrypting.