microsoftgraph / powershell-intune-samples

This repository of PowerShell sample scripts show how to access Intune service resources. They demonstrate this by making HTTPS RESTful API requests to the Microsoft Graph API from PowerShell.
MIT License
1.33k stars 653 forks source link

Microsoft.IdentityModel.Clients.ActiveDirectory.dll missing #255

Open tmontney opened 1 year ago

tmontney commented 1 year ago

AppConfigurationPolicy_Export.ps1 fails on lines 86 and 88. I've reinstalled the AzureAD module (as well as the preview module) and ensured it's latest. Both PS5 and PS7 fail in this manner. I cannot find these .dll files in the AzureAD module directory.

Additionally, PS5 had an additional error: Â : The term 'Â' is not recognized as the name of a cmdlet, function... (PS7 had no issue with this.) VSCode noted the following: The character U+00a0 is not a basic ASCII character. There were 5 instances of that character on its own line. Once replaced with an empty string, it was only the LoadFrom errors that remained.

blademansw commented 11 months ago

@tmontney I was seeing the same issue, looks like they haven't updated the scripts to use the newer MSAL libraries. The solution is to install a deprecated version using the command Install-Module -Name AzureAD -RequiredVersion 2.0.2.140 as per the instruction from michalorac in this issue: https://github.com/microsoftgraph/powershell-intune-samples/issues/254