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

[BUG] Included Micrsoft.Graph.Core.dll dependency conflict with Microft.Graph module #3877

Closed
5 tasks
jnkgee opened this issue Apr 8, 2024 · 1 comment
Closed
5 tasks
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@jnkgee
Copy link

jnkgee commented Apr 8, 2024

Reporting an Issue

Installing PnP.Powershell from PSGallery 2.4 includes a copy of Micrsoft.Graph.Core.dll version 1.25.1. This conflicts with the version of this dll installed by Microsoft.Graph 2.x.x

Expected behavior

PnP.Powershell and Micrsoft.Graph should both be usable in a single Powershell Session.

Actual behavior

Actual behaviour depends on which module is connected first.

If PnP.Powershell connects first, Connect-Graph (using Certificate authentication) will throw errors similar to:
ClientCertificateCredential authentication failed: Could not load type 'Microsoft.Identity.Client.BaseAbstractApplicationBuilder`1' from assembly 'Microsoft.Identity.Client, Version=4.50.0.0,

If Microsoft.Graph is loaded first, and then PnP.Powershell, connection will succeed.

However, calls to Get-MgUser will result in errors:
Could not load type 'Microsoft.Graph.Authentication.AzureIdentityAccessTokenProvider' from assembly 'Microsoft.Graph.Core, Version=1.25.1.0

Steps to reproduce behavior

Clear out all old versions of PnP.Powershell and Microsoft.Graph.
Install PnP.Powershell 2.4.0 and Microsoft.Graph 2.x.x (tested with 2.16.0 and 2.17.0 and several others)
Attempt to connect to PnP.Powershell and Micrsoft.Graph using Certificate authentication.

What is the version of the Cmdlet module you are running?

2.4.0

Which operating system/environment are you running PnP PowerShell on?

  • [ X] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Steps to correct

Locate Microsoft.Graph.Core.dll from the module storage Modules\Microsoft.Graph.Authentication\2.x.x\dependencies\Core
Copy this file to Modules\PnP.Powershell\2.4.0, overwriting the version 1.25.1

Connect-Graph
Connect-PnPOnline
.. work as normal.

PnP.Powershell appears to be happy to use the current version (2.17.0) of this DLL, but Graph v2.x.x cannot function if the 1.25.1 dll has been loaded.

@jnkgee jnkgee added the bug Something isn't working label Apr 8, 2024
@veronicageek veronicageek added the duplicate This issue or pull request already exists label Apr 8, 2024
@veronicageek
Copy link
Collaborator

There's already an issue opened #3637 with conflicts for MSGraph.

@veronicageek veronicageek closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants