markstan / Test-IntuneFirewallRules

Utility to detect errors in Intune Firewall Rules XML
MIT License
14 stars 3 forks source link

Auth to Azure AD is failing; Can't find module file; #7

Closed jeffl86 closed 8 months ago

jeffl86 commented 8 months ago

Can't find file in Azure AD module. Seems module may be deprecated?

https://learn.microsoft.com/en-us/entra/identity-platform/msal-migration

_Checking for AzureAD module... Get-AuthToken : Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\AzureAD\2.0.2.182\Microsoft.IdentityModel.Clients.ActiveDirectory.dll' or one of its dependencies. The system cannot find the file specified." At C:\temp\Test-IntuneFirewallRules.ps1:1625 char:23

markstan commented 8 months ago

Thanks for the heads-up, @jeffl86. I've checked in a fix that removes the AzureAD module dependency (deprecated on 3/30/2024).

jeffl86 commented 7 months ago

Thanks Mark! I did have to run this command to get it to work in my environment.
Connect-MgGraph -Scopes DeviceManagementConfiguration.Read.All