Set-WarrantyAPIKeys only asks for the $DellClientID
Closed this issue · 3 comments
I could be doing something wrong but when I go to set the warranty keys, it asks me for the $DellClientID and then says the keys have been set.
I could not find where they are actually set either and when I go to use it, it fails.
PS C:\WINDOWS\system32> Set-WarrantyAPIKeys
cmdlet Set-WarrantyAPIKeys at command pipeline position 1
Supply values for the following parameters:
DellClientID: 7fccf10d5bxxxxxxxxa09876248xxx3ae
Setting Dell Warranty API Keys
Tried on another machine and re installed - It worked no problems.
I've got the same problem, unfortunatly reinstalling it and trying it on a different machine does not work for me.
Set-warrantyAPIKeys only asks me for the DellClientID and seems to skip the DellClientSecret.
Causing Get-DellWarranty.ps1 to give me the folowing error:
Source is Datto RMM. Grabbing all devices.
Getting DattoRMM Devices
Invoke-RESTMethod : {
"error":"invalid_client",
"error_description":"The given client credentials were not valid"
}
At C:\Program Files\WindowsPowerShell\Modules\PSWarranty\1.2.1\private\Get-DellWarranty.ps1:22 char:23
- ... uthResult = Invoke-RESTMethod -Method Post -Uri $AuthURI -Body $AuthB ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
-
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Invoke-RestMethod : {"Fault": {
"faultcode": "401",
"faultstring": "Invalid Authentication",
"faultactor": "https://apigtwb2c.us.dell.com/PROD/sbil/eapi/v5/asset-entitlements?servicetags=XXXX"
}
-
}
It seems like I did not make both parameters mandatory, workaround:
`Set-WarrantyAPIKeys -DellClientID 'YOURID' -DellClientSecret 'YOURSECRET'
Fixed in latest build, so closed for now.