/build/static/layout/Breadcrumb_cap_w.png
08/28/2019 240 views

Hi All, 

I'm trying to do some API calls and integration so that we can snag inventory info for our devices and pipe it into SalesForce. I found the KaceSMA module that ArtisanByteCrafter wrote. I'm having some issues though.

To be fair i'm new to the API calling business so i'm likely missing something obvious.

after importing the module, when i try and run a simple Get-SMAMachineInventory i'm queried for server and credentials, and i receive the following error:

Invoke-RestMethod : The remote server returned an error: (401) Unauthorized.
At C:\Program Files\WindowsPowerShell\Modules\kacesma\1.0.8\private\New-ApiGETRequest.ps1:80 char:5
+     Invoke-RestMethod @IRMSplat
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand


It doesn't seem to matter what account i use, they're all throwing that error. what did i do wrong? 


1 Comment   [ + ] Show comment

Comments

  • i played around with ARC in chrome and noticed that what i thought would be x-dell-csrf-token appears now to be kace-csrf-token...

All Answers

1

ArtisanByteCrafter is usually on slack more then here, join slack thru this invite and post there also


Answered 08/28/2019 by: SMal.tmcc
Red Belt

  • see you did get on slack. cool
    • thanks man - i actually got into the slack channel. i just targeted a message at him.
      • just went to slack and saw you posted.