MSEndpointMgr / IntuneWin32App

Provides a set of functions to manage all aspects of Win32 apps in Microsoft Intune.
MIT License
341 stars 88 forks source link

Token Refresh and Client Secret authentication is not working #130

Open ITRSOELM opened 9 months ago

ITRSOELM commented 9 months ago

When uploading a lage package and using Client Secret as authentication method. The Token Refresh failes with following: WARNING: An error occurred while attempting to retrieve or refresh access token. Error message: No account or login hint was passed to the AcquireTokenSilent call.

Is this a limitation in the MSAL.ps module?

And is there a solution to having the token refreshed when using Client Secret?

NickolajA commented 6 months ago

AcquireTokenSilent call is a function within the MSAL.PS module. Unfortunately this module is no longer being maintained by Microsoft, and it's on my todo list to switch to another module (not sure which one yet to be honest), as I don't want to also maintain custom authentication pieces, the whole project becomes so much larger by doing just that.

However, when looking into this a bit more and testing the actual command in the Invoke-AzureStorageBlobUpload function, I can definitely see that it's not working as expected.