[issue] Connect-MgGraph : Method not found: ‘System.Action`1 Azure.Identity.IMsalPublicClientInitializerOptions.get_BeforeBuildClient()’.


Cause

Old version of Az.Accounts v2.9.1 was being installed on the computer as part of Az.Portal installation, even though newer version was already found on the machine. Temporary solution is to remove Az.Accounts v2.9.1 from the machine.

Background

Customer is running latest version of Az-modules. All old modules have been removed. But if the customer installs PS-module Az.Portal, then it will wrongly install an old version of Az.Accounts (v2.9.1), even a newer version is installed.

The impact is shown, when the customer tries to sign-on with Connect-MgGraph (v.2.3), where this error is thrown

Connect-MgGraph : Method not found: ‘System.Action`1<Microsoft.Identity.Client.PublicClientApplicationBuilder> Azure.Identity.IMsalPublicClientInitializerOptions.get_BeforeBuildClient()’.

Issue is escalated to MS, so Az.Portal will use newer version of Az.Accounts.

Leave a Reply