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

If Connecting to MSGraph then connecting to ExchangeOnline, error OperationStopped: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0. #4982

Open
6 tasks done
chrisclosacr opened this issue Apr 26, 2024 · 3 comments
Labels

Comments

@chrisclosacr
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

I get the following error when trying to Connect-ExchangeOnline after doing a Connect-MgGraph. This Only happens in the Powershell Extension, I'm able to use this with pwsh.exe directly or MS Terminal without the error:

OperationStopped: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0, Culture=neutral, PublicKeyToken='.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : Visual Studio Code Host
Version          : 2024.2.1
InstanceId       : be24d740-2125-4bf7-aa9b-5633feaa8977
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.88.1
e170252f762678dec6ca2cc69aba1570769a5d39
x64

Extension Version

adamwojcikit.pnp-powershell-extension@2.12.21
ms-vscode.powershell@2024.2.1
tobysmith568.run-in-powershell@1.2.0

Steps to Reproduce

Connect-MgGraph -Scopes 'User.Read.All'
Connect-ExchangeOnline

Visuals

20240426-PSError-ConnectExchangeOnline-stepsrecording.zip

Logs

No response

@chrisclosacr chrisclosacr added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Apr 26, 2024
@SydneyhSmith
Copy link
Collaborator

@chrisclosacr do you have any other modules loaded? gmo

@SydneyhSmith SydneyhSmith added Needs: Author Feedback Please give us the requested feedback! and removed Needs: Triage Maintainer attention needed! labels May 7, 2024
@chrisclosacr
Copy link
Author

chrisclosacr commented May 7, 2024 via email

@github-actions github-actions bot added Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Author Feedback Please give us the requested feedback! labels May 7, 2024
@SydneyhSmith
Copy link
Collaborator

Thanks @chrisclosacr might be due to the way PSSA loads modules in the editor

@SydneyhSmith SydneyhSmith added Area-Script Analysis and removed Needs: Maintainer Attention Maintainer attention needed! labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants