CloudShell icon indicating copy to clipboard operation
CloudShell copied to clipboard

[BUG] AzureAD cmdlets return error after Connect-AzureAD is successful using CloudShell in M365 Admin Center

Open MichaelLaMontagne opened this issue 5 years ago • 2 comments

To Reproduce

Created new CloudShell in Microsoft365 admin center. Do not launch Cloudshell via portal.azure.com! If you run Connect-AzureAD from portal.azure.com the issue is resolved unless you restart CloudShell in Microsoft365 admin center.

Connect-AzureAD
Get-AzureADUser
Get-AzureADGroup

Observed Behavior

AzureAD cmdlets like Get-AzureADUser or Get-AzureADGroup take a long time to process and return with a token missing or malformed error. image

Code: Authentication_MissingOrMalformed
Message: Access Token missing or malformed.
HttpStatusCode: Unauthorized
HttpStatusDescription: Unauthorized
HttpResponseStatus: Completed

Expected behavior

cmdlets to return results

Is this specific to Cloud Shell?

No issue in standard PowerShell or if using the same CloudShell via https://portal.azure.com

Interface information

How are you accessing Cloud Shell - https://admin.microsoft.com/ If a browser, which Operating System and browser are you using? Edge on Windows 10

Additional context

Tried CloudShell in multiple tenants with same results when using from https://admin.microsoft.com.

MichaelLaMontagne avatar Mar 13 '21 20:03 MichaelLaMontagne

9 months and the bug still is occurring. Also seen with CloudShell in Microsoft Teams admin center: image

MichaelLaMontagne avatar Dec 13 '21 14:12 MichaelLaMontagne

This is still a bug, crazy how long this has been an open item...

MichaelLaMontagne avatar Sep 17 '23 15:09 MichaelLaMontagne