vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

ERROR: Could not load file or assembly 'Microsoft.Identity.Client' (ExchangeOnlineManagement + PS 7.2.6)

Open robertcaretta opened this issue 2 years ago • 0 comments

Prerequisites

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

Summary

When using this extension I get the error below. However if I run the same commands in a regular powershell 7.2 window (not VS Code) the code below runs fine.


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

PowerShell Version

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

Visual Studio Code Version

1.71.2
74b1f979648cc44d385a2286793c226e611f59e7
x64

Extension Version

[email protected]

Steps to Reproduce

Could you please test out this combination of tools?

  1. VS Code 1.71.2
  2. PowerShell Extension v2022.8.5
  3. Powershell 7.2.6
  4. ExchangeOnlineManagement 3.0.0

Then try running these commands: Import-Module ExchangeOnlineManagement Connect-ExchangeOnline -InlineCredential Connect-ExchangeOnline -CertificateThumbprint 'YOURTHUMB' -AppID 'YOURAPP' -Organization 'YOURORG'


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

Visuals

No response

Logs

No response

robertcaretta avatar Sep 21 '22 20:09 robertcaretta