-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke-AzureStorageBlobUploadFinalize, missing Content-Type header #155
Comments
Just adding a quick note - we've seen early promising signs testing this on our parallel project where we similarly didn't have the header declared on the finalize call and ran into 7.4.2 when it landed on the AZDO agents yesterday. |
I can confirm that IntuneWin32App.Add-IntuneWin32App fails with Powershell 7.4.2. Console output include the messages: " The issue could be circumvented by using Windows Powershell 5.1. |
I ran into this same problem today with PowerShell 7.4.2 and Micrsosft.Graph 2.19.0. \IntuneWin32App\1.4.4\Private\Invoke-AzureStorageBlobUploadFinalize.ps1 threw the warnings:
To fix this, starting in line 35, change:
to
See also Add-IntuneWin32App.ps1 'CommitFile' failed error with PowerShell 7.4.0 #128, where the same problem occurred in AzureStorageBlobUploadChunk.ps1. |
Thanks got it running again! |
going to close other issue. making those changes as per thread fixed. |
Please update the function Invoke-AzureStorageBlobUploadFinalize to fix the issue with PS 7.4.2. FYI Handle-Error is a custom function that I built wrapping out Get-Error (VERY USEFUL in PS7) The error message indicates that the 'Content-Type' key is not present in the dictionary when making the Invoke-RestMethod call. This suggests that the Content-Type header is required for the request but is missing. By explicitly setting the Content-Type header to application/xml, the Invoke-RestMethod call should properly handle the request. This should resolve the KeyNotFoundException error you encountered. You can add the Content-Type header explicitly to the Invoke-RestMethod call. Here's the modified function: \IntuneWin32App\1.4.4\Private\Invoke-AzureStorageBlobUploadFinalize.ps1
|
Thanks for this fix mate! |
I am on Powershell 7.4.4 and IntuneWin32App module version 1.4.4 yet still encountering this issue. I have made the necessary changes to the files, they appear identically to the fix examples posted earlier in this thread.
Invoke-AzureStorageBlobUploadFinalize.ps1, starting line 35
I also tried adding |
Just tested the fix from #157 with PS 7.4.4 and can confirm it does the job. |
Hello, can you please
add
this headers to the Invoke-AzureStorageBlobUploadFinalize function?The text was updated successfully, but these errors were encountered: