Different Tenant ID showing on PowerShell than on Portal

bwalley_21st_net 26 Reputation points
2021-10-07T17:47:14.6+00:00

When I log into portal.azure.com and view the tenant id it shows one thing. I can navigate around and do things as expected.

When I use powershell and connect-azuread it returns with a different tenant id and no commands seem to work.

Using my global admin account. Same ID and password. This is an account that was set up to do training and testing.

Any ideas as to the disconnect? Am I missing something?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marilee Turscak-MSFT 33,801 Reputation points Microsoft Employee
    2021-10-07T17:56:00.163+00:00

    Make sure you specify a tenant ID in the request.

    Try:

    Connect-AzureAD -TenantId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    If you just use Connect-AzureAD , the TenantDomain will be "User" and it may pull up the wrong tenant.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful