Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Microsoft.Identity.Client #2147

Closed
vipulkelkar opened this issue Jul 11, 2023 · 2 comments
Closed

Issues with Microsoft.Identity.Client #2147

vipulkelkar opened this issue Jul 11, 2023 · 2 comments

Comments

@vipulkelkar
Copy link

vipulkelkar commented Jul 11, 2023

We use the Microsoft Graph PowerShell module along with the 'Az' PowerShell module in Azure function app and the requirements.psd1 specifies the following. The execution runtime is PowerShell Core

'Az' = '6.*'
'Microsoft.Graph' = '1.7.0'

Since 7/7/2023, we have started observing errors in Microsoft.Graph module. The version 2.0.0 seems to have been released on that day : https://www.powershellgallery.com/packages/Microsoft.Graph/2.0.0

The error we see while trying to connect using "Connect-MgGraph" is :
"Could not load file or assembly 'Microsoft.Identity.Client, Version=4.49.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'. Could not find or load a specific file. (0x80131621) Could not load file or assembly 'Microsoft.Identity.Client, Version=4.49.1.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference."

The modules have been working well for several months before the release of PowerSHell Graph 2.0.0
We observed that a new module was downloaded on 6/7/2023.

image

The difference between the previous and new working module is

image

image

The Az.Accounts version in both is 2.9.1. I see that the Microsoft.Identity.Client.dll is also there in the Az Accounts module

Although the error says the dll could not be loaded, i can see that DLL of version 4.49.1.0 has been downloaded with the module. Is this an issue with Mg Graph's compatibility with 'Az' module ? Is there a guidance on how to ensure both work seamlessly ?

@yuanweilei
Copy link

I am just curious that why 'Microsoft.Graph' = '1.7.0' got Microsoft.Graph.Authentication 1.9.6 in your Azure function app, because Microsoft.Graph.Authentication has version 1.10.0 or more.
https://www.powershellgallery.com/packages/Microsoft.Graph.Authentication/1.10.0

Since Microsoft.Graph.Authentication 2.1.0 was released, it seems 'Microsoft.Graph' = '1.7.0' will get Microsoft.Graph.Authentication 2.1.0 now.

@peombwa
Copy link
Member

peombwa commented Jul 17, 2023

This is a duplicate of #2164 (comment). The ability to install older versions of the SDK was added in v1.12.2.

Please use the latest version of v1.x (v1.28.0) if your goal is to use v1.x - Install-Module -Name Microsoft.Graph -RequiredVersion 1.28.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants