Closed ElizabethGreene closed 4 months ago
I didn't realize these samples were deprecated. That explains why they don't work. See the link under "IMPORTANT" on https://github.com/microsoftgraph/powershell-intune-samples for links to the new samples that use the Graph SDK Powershell modules.
Since the repo is read-only I'm not submitting a PR for this, but this script, renamed to .txt from .ps1, shows what it looks like to rewrite the authentication function to support either ADAL or MSAL, whichever one is installed. I have thoroughly tested the MSAL workflow, but I have no way to test the ADAL workflow. It's mostly unmodified from the original, but again untested.
Depricated? I see they were updated 1 month ago... but still not working.
The update made last month was to remove the old ClientID out of the Auth section. If you want to continue using the scripts, you'll need to create and supply a new ClientID. See the readme.md for the repo for more details.
SettingsCatalog/SettingsCatalog_Export.ps1 on a newly built Windows 11 machine with the default AzureAD module installed fails with the following output.
The error is because the script expects these ADAL.NET libraries to be installed with the AzureAD module, but ADAL.net is deprecated and no longer included. A workaround (untested) should be to force install an older version of the AzureAD module, but a better solution would be to rewrite this script. Microsoft has guidance on that rewrite process here. Migrate confidential client applications from ADAL.NET to MSAL.NET