Skip to content
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

Bug - Authentication Header not working on MacOS #182

Open
pcdiks opened this issue Oct 10, 2024 · 0 comments
Open

Bug - Authentication Header not working on MacOS #182

pcdiks opened this issue Oct 10, 2024 · 0 comments

Comments

@pcdiks
Copy link

pcdiks commented Oct 10, 2024

I have installed the latest version of intuneWin32App and updated my local powershell modules to the latest versions.
I am running powershell 7.4.5 on MacOS Sequoia 15.0.1.

After connecting to the environment with Connect-MSIntuneGraph -TenantId <mydomain.onmicrosoft.com> -clientid -ClientSecret , which works fine, I get an error message when I run: Get-IntuneWin32App.

The error is:

ConvertFrom-Json: /Users/pcd/.local/share/powershell/Modules/IntuneWin32App/1.4.4/Private/Invoke-MSGraphOperation.ps1:189
Line |
 189 |  … ErrorDetails = $ExceptionItem.ErrorDetails.Message | ConvertFrom-Json
     |                                                         ~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'InputObject' because it is null.

After some troubleshooting I found a fix, I have to remove the ExpiresOn from the AuthenticationHeader hashtable.
If I do that, then it works.

Running the same command on a recent Windows 11 machine works fine.

The problem occurs in the Invoke-MSGraphOperation.ps1 script on line 141. If I run that line without the try/catch I get this error:

[DBG]: PS /Users/pcd/.local/share/powershell/Modules/IntuneWin32App> Invoke-RestMethod @RequestParams -verbose
Requested HTTP/1.1 GET with 0-byte payload
Invoke-RestMethod: Request headers must contain only ASCII characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant