-
Notifications
You must be signed in to change notification settings - Fork 510
Unable to connect to Exchange Online #4385
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
Comments
I have the same issue since I updated ExchangeOnlineManagement module.
|
Can you confirm that you can run the module as expected in a normal PowerShell terminal, that is, not in VS Code? |
I can confirm, that im seeing the same issue. |
I need to share that the issue was solved, on my side, thanks to this finding from pttbr ! |
Thank you @jerome-dl! That's...super interesting because the flip side of this issue is the same weird "it just doesn't work" with PnP.PowerShell #3510 |
I have you tried the workaround posted above? |
What is the workaround exactly? It's not clear to me from the linked issue which mentions PnP.PowerSell, but I haven't ever used that module, so how does that enter the picture? Getting a bit confused here :) |
A whole bunch of modules, like PnP.PowerShell and Exchange Online, rely on different (and conflicting) versions of some of the identity assemblies. The simplest workaround is to avoid loading any other module before trying Exchange Online, and that will likely work, but you need to check your profile or scripts you might be loading before using the module. Otherwise some people have had success altering the Exchange Online module manifest. |
That does in fact seem to work for the ExchangeOnlineManagement module, but not for the MSOnline module: I'm afraid the thing you mention about altering manifests is a little bit beyond my skills, as I am really just a sysadmin trying to get all the Office 365 related modules working in VSCode on MacOS, so that I no longer have to deal with this in my Windows VM ^_^ |
Oh, @foss4ever, your screenshot actually shows that you're not in the Extension Terminal, so your issue is directly with MSOnline. You're in a regular This repository is specifically for issues with the PowerShell Extension, and so specifically the "PowerShell Extension" terminal, the one selected in this screenshot (it'll also have a "PowerShell Extension v2023.2.1" banner when it starts up): If your issue occurs in one that just says "pwsh" not "PowerShell Extension" then it's not related to the code in this repo. I can still try to direct you to help, but it's not something I can solve. In the article I linked (best thing I could find for "MSOnline") I would note that it says:
So it's possible that module isn't even supported any more. Sorry! I hope you find a solution. |
This issue has been marked as external. It has been automatically closed for housekeeping purposes. |
I'm sorry for not getting back on this issue sooner, and for hassling you about a deprecated msonline module, but I do in fact get that very same error when attempting to connect-azuread in the PowerShell Extension terminal within VSCode: Do I need to open a new issue for that? |
@foss4ever not sure what's going on there, a lot that could be wrong. System.Windows.Forms is in .NET Core now, but I think maybe still Windows-only...it also looks like it could be a dependency conflict between it and another module. Please do open another issue! |
Prerequisites
Summary
I can't connect to Exchange Online from VS Code terminal.
Running command "connect-exchangeonline" I get the following error:
OperationStopped: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0, Culture=neutral, PublicKeyToken=03ae'.
The issue does not reproduce in standalone PowerShell terminal.
PowerShell Version
Visual Studio Code Version
Extension Version
The term 'code' is not recognized as a name of a cmdlet, function, script file, or executable program.
Steps to Reproduce
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: