rzander / ruckzuck

software package manager for windows
https://ruckzuck.tools
Microsoft Public License
221 stars 20 forks source link

Invoke-RestMethod gives (401) unauthorized. Was working fine a few weeks ago #196

Closed hotzenwalder closed 2 years ago

hotzenwalder commented 2 years ago

Since last week every time we try to package an application with RuckZuck for Intune it starts downloading the app, but then gives an error in Powershell and just quits.

2022-08-23 20_01_27-Window

I have no idea what is going wrong, nothing was changed on our end. Only thing that comes to mind after reading other issues is we might be blacklisted, but to my knowledge we are using the application as it is intended. Could you tell us what might be behind this error?

`Invoke-RestMethod : The remote server returned an error: (401) Unauthorized. At C:\Users***\AppData\Local\Temp\intunewin\RZ4Intune.ps1:1224 char:9

Invoke-WebRequest : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\Users***\AppData\Local\Temp\intunewin\RZ4Intune.ps1:1240 char:24

Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid DateTime." At C:\Users***\AppData\Local\Temp\intunewin\RZ4Intune.ps1:1255 char:89

grantemsley commented 2 years ago

If you're using official tools, update them. If you're using your own scripts, you'll need an API key.

They recently locked out some of the APIs to prevent people from hammering them excessively and putting a lot of load on the servers. The apps have been updated to work still.

rzander commented 2 years ago

Replace RZ4Intune.exe with this one: https://github.com/rzander/ruckzuck/releases/tag/1.7.2.5

hotzenwalder commented 2 years ago

Thanks for the quick fix. The new version works as expected again. We are not using our own scripts, just the RZ4Intune.exe We thought we were using the latest version because 1.7.2.2 is the latest available version on https://ruckzuck.tools/ Will use this link in the future instead or would it be possible to let RZ4Intune update itself?