Open joergrenn opened 4 years ago
I have the same issue:
VERBOSE: Importing cmdlet 'New-ExoPSSession'. New-ExoPSSession: HttpRequestExceptionMessage: Response Status Code BadRequest, Request Method GET, Request Uri http://localhost:50342/oauth2/token?resource=https%3A%2F%2Foutlook.office365.com%2F&api-version=2018-02-01, Response Contetnt {"error":{"code":"invalid_request","message":"Timeout waiting for token from portal. Audience: https://outlook.office365.com/"}}
I tried the connect-eXOPSSession
without any parameters and with the following: connect-eXOPSSession -Verbose -BypassMailboxAnchoring -ConnectionUri https://outlook.office365.com/PowerShell-LiveID/?BasicAuthToOAuthConversion=true
. The result is the same, with and without parameters: Timeout while waiting for the Token from the portal.
If i try the same within the CloudShell of the admin center is works just fine:
PS /home/joerg> Connect-EXOPSSession
WARNING: The names of some imported commands from the module 'tmp_l5z1444b.lsw' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
WARNING: The names of some imported commands from the module 'tmp_l5z1444b.lsw' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.```
I am trying to connect to Exchange Online in a VS Code Cloud Shell, but the Connect-EXOPSSession command fails everytime. If I use a cloud shell in the browser on shell.azure.com the Connect-EXOPSSession command works without issues. The error message I in VS Code is:
Connect-EXOPSSession -Verbose