how to find tenant based on subscription

Jan Fimbinger 0 Reputation points
2023-07-25T11:11:39.4233333+00:00

I have received from MS warning about subscriprion changes, but I am not able to locate this subscription ID and MS dont provide me tanant, but IS only.

Microsoft Security Microsoft Entra Microsoft Entra External ID
Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2023-07-25T11:46:41.12+00:00

    Hi @Jan Fimbinger ,

    maybe this PowerShell script helps to identify the related Azure Tenant (Azure AD) of an Azure Subscription. The Az Powershell module is required.

    Connect-AzAccount
    $tenantID = (Get-AzSubscription -SubscriptionName "<xyz Subscriptionname> ").TenantId
    Get-AzTenant -TenantId $tenantID
    

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.