AzureAD / MSAL.PS

MIT License
159 stars 29 forks source link

"Microsoft.Identity.Client.dll" conflicts w/same assembly from ExchangeOnlineManagement module #69

Open cobdev opened 1 year ago

cobdev commented 1 year ago

Hello Everyone,

It appears that "Microsoft.Identity.Client.dll" packaged with the current version of MSAL.PS v4.37.0.0 is in conflict with that of ExchangeOnlineManagement v3.1.0. This happens in PowerShell 7.3.2, but not when the same commands are run in PowerShell 5.1.

2023-05-09_12-12
bgavrilMS commented 1 year ago

MSAL 3.1.0 is extremely old, is there a version that uses MSAL 4.* ? PowerShell and .NET doesn't allow for 2 versions of the same DLL to be loaded into memory at once.

cobdev commented 1 year ago

FYI: v3.1.0 is the most recent version of the "ExchangeOnlineManagement" module: https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.1.0

I'm refering to the error MSAL throws in this case.

micmaher commented 1 year ago

I had problems with these two modules not cooperating also.

I am using Windows PowerShell. The ExchangeOnlineManagement version of Microsoft.Identity.Client.dll was loaded into the GAC. I changed the code to load the MSAL.PS module first and was able to get past this issue. v4.0.30319 of this DLL from MSAL.PS is now showing in the GAC.

My error was the same as that in #68