Connect-ExchangeOnline

Product: PowerShell Universal
Version: 3.3.6

Am having some issues with connecting with Connect-ExchangeOnline.
When the command is run, the dashboard “hangs” and I get 4 errors in the Log:

Cannot bind argument to parameter 'Path' because it is null.

2 before Connect-ExchangeOnline and 2 after.
Trying to export the error i can see that the command failing is Test-Path (can’t get any more useful information).

I am using version 3.0.0 of ExchangeOnlineManagement (or V3).

Has anyone been successful in using this?
I can see old topics about the same issue but I can’t see that the solutions there (ShowBanner:$false) solves my issue.

Is your dashboard running under 5.1 or 7.x? I’ve had issues with the EXO commands working in 7.x.

We are running 7.x.
It seems like it is only the connection that is fails, after this it seems to work (guessing until the connection times out).

Are you connecting with a certificate? I ran into that issue when referencing a cert that weren’t available in the context i connected from

Yeah this works for me.

Connect-ExchangeOnline -AppId $AppId -CertificateThumbprint $thumprint -Organization $Org -ShowBanner:$false

You have to set up App based Auth via an AzureAD app, details on this page:-

And as PorreKaj says when you create the cert and load it into the certificate store on your script box it needs to be in the local user cert store for the user your script runs as. If you have UD running as the LocalUser account, you can open its cert store by getting hold of PsExec PsExec - Windows Sysinternals | Microsoft Learn then use that to open a command prompt as the LocalUser like this.
psexec -i -s cmd.exe
The from that command prompt, run mmc.exe then add the Local User Certificates Snapin. Then you can install your cert.

Theres quite a few moving parts here but its not that complicated once you get your head around it.

Woody

The connection works, so all of that is configured correctly.
The issue is that I got errors when connecting, 4 of them:

Cannot bind argument to parameter 'Path' because it is null.

The connection works after this, but the errors will be displayed (as Toasts) on the page, any which way I try to hide them:

 try {
                $null = Connect-ExchangeOnline | Out-Null
 }
catch {}