Exchange Online Management

Not seeing any reference for Exchange Online Management. I have the Exchange Online Management module installed and ready for use. What is the best way to pass O365 credentials to the script?

Product: PowerShell Universal
Version: 2.9.1

You can use secret variable and store it in localbutinvalue.

Then pass the creds to the login for exchangeonline.

But I guess the best way is to do a apppassword in control panel and use cert or similar I’m doing it like that for Azure and ms graph so I’m guessing it’s possible for exchange online also.

MS is dropping support for basic authentication in exchange online this year, I would spend my time getting Cert based authentication working instead.

1 Like

Thank you both for the responses. I’ll starting moving that way.

This one is great: How to Connect to Exchange Online PowerShell via v2 Module (

Has anyone got this working? I can connect to Exchange using thumbprint and appID;

Connect-ExchangeOnline -AppId ‘’ -CertificateThumbprint ‘’ -Organization ‘’

When I put the same code into PSU as part of my API it fails with the following…

TypeError: (intermediate value)(intermediate value)(intermediate value).create is not a function

at pe (https://<servername>/admin/static/js/0.cf1b51ae.chunk.js:1:12079)
at R (https://<servername>/admin/static/js/32.fe8f5939.chunk.js:1:13252)
at K (https://<servername>/admin/static/js/32.fe8f5939.chunk.js:1:7871)
at div
at div

My mistake. I had put the certificate in a location that the service account couldn’t read. moved it. Now working.