Error Unauthorized when trying to use ZervicePoint PowerShell Management
Problem
When trying to run a get (i.e Get-ZPService) command via the ZervicePoint PowerShell Management I get
get-zpservice : Unauthorized. At line:1 char:1 + get-zpservice + ~~~~~~~~~~~~~ ** + CategoryInfo : PermissionDenied: (:) [Get-ZPService], UnauthorizedAccessException** ** + FullyQualifiedErrorId : Zipper.ZervicePoint.WebApi.PowerShell.GetZPServiceCommand**
Solution
- Make sure your user is included in groups or directly in the APIStoreAdmin role with it's primary email address
- Make sure the API environment variables is present as in the How to get started with ZervicePoint PowerShell Management article
-
Make sure you have an active Security Token by running
Get-ZPSecurityToken | Set-ZPSecurityToken
or if this is your first time, by getting a token from the credentials of your user, as mentioned in How to get started with ZervicePoint PowerShell Management