KelvinTegelaar / PowerShellWarrantyReports

a repo dedicated to automatic warranty reporting and retrieval from different systems such as IT-Glue, Connectwise, Autotask, and N-central.
GNU Affero General Public License v3.0
173 stars 71 forks source link

NinjaOne API issue with Dell machines under warranty #86

Open BluebirdTechnology opened 5 months ago

BluebirdTechnology commented 5 months ago

I am getting an error with Dell workstations that are still in warranty. It seems that the servers report a warranty end date in the future but different devices are not showing their end date and give me this error: Get-WarrantyNinja : Failed to update device: { "resultCode": "FAILURE", "errorMessage": "INVALID_ATTRIBUTE_VALUE", "incidentId": "WEB_MGMT_SERVICE-2a-" } At C:\Program Files\WindowsPowerShell\Modules\PSWarranty\1.8.0\Public\Update-WarrantyInfo.ps1:114 char:35

annoyerjones commented 4 months ago

I am getting same error with some newer Dell devices. I reached out to the Dell API team and they found the following issue, I just don't know where or how to perform the adjustment they mentioned. If anyone has an idea I'm all ears. Below is the Dell response.

The difference in end date for the below service tags are as follows: CB6CQ73 - "endDate": "2025-11-11T05:59:59.14Z", 9TPQ4Y3 - "endDate": "2024-09-28T04:59:59.000001Z",

It seems like your system is not reading the microseconds .000001 causing this issue. Recommend adjusting the second date format to match the precision of the first date format, it should become readable by the system.

Ex: Truncate the date to "endDate": "2024-09-28T04:59:59.00Z"