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.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.9k
- Forks
- 548
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die gemeldete Abfolge in der PowerShell-Erweiterung zu reproduzieren: Führe Connect-MgGraph -Scopes 'User.Read.All' und anschließend Connect-ExchangeOnline aus und vergleiche sie mit pwsh.exe oder Microsoft Terminal. Untersuche den PowerShell-Runspace und das Verhalten beim Laden von Assemblys der Erweiterung; abgeschlossen ist die Untersuchung, wenn beide Befehle in VS Code ohne den Microsoft.Identity.Client-Fehler erfolgreich abgeschlossen werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- powershell, typescript, vscode
- Bereich
- developer-experience, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100