-
Notifications
You must be signed in to change notification settings - Fork 380
Description
Reporting an Issue or Missing Feature
Running Microsoft.Graph cmdlets, such as Connect-MgGraph and Get-MgApplication, produce an assembly conflict error if run after PnP.PowerShell assemblies have already been loaded.
Expected behavior
According to release notes for PnP.PowerShell 2.3.0, assembly conflicts have been resolved. With this being true, I was hopeful I could develop a script that used cmdlets from both PnP.PowerShell and Microsoft.Graph. In my scenario, this doesn't appear to be the case.
Actual behavior
Results from trying to run Connect-MgGraph and Get-MgApplication after PnP had already been loaded:
Output of assemblies loaded in the session. The two assemblies called out in the MgGraph exception are sourced from the PnP.PowerShell Module
Steps to reproduce behavior
Import-Module PnP.PowerShell
Connect-PnPOnline -Url $url -Interactive
Disconnect-PnPOnline
Import-Module Microsoft.Graph
Connect-MgGraph
Connect-MgGraph -TenantId $TenantId -ClientSecretCredential $ClientSecretCredential
Get-MgApplication
Disconnect-MgGraph
What is the version of the Cmdlet module you are running?
PnP.Powershell - 2.3.3 Nightly Build
Microsoft.Graph.Authentication - 2.9.0
Microsoft.Graph.Applications - 2.9.0
Which operating system/environment are you running PnP PowerShell on?
- [x ] Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify