PowerShell / PowerShell/vscode-powershell

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

Aperta
#4,982 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Area-Script Analysis Issue-Bug
Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo la sequenza segnalata nell'estensione PowerShell: esegui Connect-MgGraph -Scopes 'User.Read.All', quindi Connect-ExchangeOnline, e confrontala con pwsh.exe o Microsoft Terminal. Analizza il runspace PowerShell dell'estensione e il comportamento di caricamento degli assembly; il lavoro è completato quando entrambi i comandi vengono eseguiti correttamente in VS Code senza l'errore Microsoft.Identity.Client.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.