navgupta I looked at the module code in Reflector and it looks like you're connecting the same way we are (connectionUri
"https://outlook.office365.com/PowerShell-LiveID?BasicAuthToOAuthConversion=true" and U/P with the authorization header contents as the password), there's just no way to bypass the token acquisition process. I originally tried passing the same formatted creds, but it looks like you're using the OAuth Resource Owner Password Credentials grant, so when it tried to pass the auth header as the password, it returned a 'your password is too long' error
We're an MSP and the "control panel" product I work on is not intended to have standing access to a single exchange environment. While we could use the -Credentials route, it would require us to collect customer user/passwords, which is a no-no, so having the ability to authenticate with access tokens is critical because we can't surface an authorization code flow popup to the end user during scheduled automations. Passing a refresh token would be fine as well, which you could use to retrieve the access token you need to connect and maintain access in the tokencache.