-
Notifications
You must be signed in to change notification settings - Fork 647
/
Copy pathhow-to-find-tenant.yml
91 lines (73 loc) · 3.56 KB
/
how-to-find-tenant.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
### YamlMime:HowTo
metadata:
title: How to find your tenant ID
description: Instructions about how to find and Microsoft Entra tenant ID to an existing Azure subscription.
author: barclayn
ms.author: barclayn
manager: femila
ms.reviewer: jeffsta
ms.date: 01/14/2025
ms.service: entra
ms.subservice: fundamentals
ms.topic: how-to
ms.custom:
- it-pro
- ge-structured-content-pilot
title: |
How to find your Microsoft Entra tenant ID
introduction: |
Azure subscriptions have a trust relationship with Microsoft Entra ID. Microsoft Entra ID is trusted to authenticate the subscription's users, services, and devices. Each subscription has a tenant ID associated with it, and there are a few ways you can find the tenant ID for your subscription.
procedureSection:
- title: |
Find tenant ID through the Microsoft Entra admin center
summary: |
Follow these steps:
steps:
- |
Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com) as at least a [Global Reader](~/identity/role-based-access-control/permissions-reference.md#global-reader).
- |
Browse to **Identity** > **Overview** > **Properties**.
:::image type="content" source="media/how-to-find-tenant/identity-overview-properties.png" alt-text="Microsoft Entra ID - Identity Properties overview":::
- |
Scroll down to the **Tenant ID** section and you can find your tenant ID in the box.
<!-- docutune:disable -->
- title: |
Find tenant ID through the Azure portal
summary: |
Follow these steps:
steps:
- |
Sign in to the [Azure portal](https://portal.azure.com).
- |
Browse to **Microsoft Entra ID** > **Properties**.
- |
Scroll down to the **Tenant ID** section and you can find your tenant ID in the box.
:::image type="content" source="media/how-to-find-tenant/portal-tenant-id.png" alt-text="Microsoft Entra ID - Properties - Tenant ID - Tenant ID field":::
<!-- docutune:enable -->
## Find tenant ID with PowerShell
To find the tenant ID with Azure PowerShell, use the cmdlet `Get-AzTenant`.
```azurepowershell-interactive
Connect-AzAccount
Get-AzTenant
```
For more information, see the [Get-AzTenant](/powershell/module/az.accounts/get-aztenant) cmdlet reference.
## Find tenant ID with CLI
The [Azure CLI](/cli/azure/install-azure-cli) or [Microsoft 365 CLI](https://github.com/pnp/cli-microsoft365) can be used to find the tenant ID.
For Azure CLI, use one of the commands **az login**, **az account list**, or **az account tenant list**. All of command's included below return the **tenantId** property for each of your subscriptions.
```azurecli-interactive
az login
az account list
az account tenant list
```
For more information, see [az login](/cli/azure/reference-index#az-login) command reference, [az account](/cli/azure/account) command reference, or [az account tenant](/cli/azure/account/tenant) command reference.
For Microsoft 365 CLI, use the cmdlet **tenant id** as shown in the following example:
```cli
m365 tenant id get
```
relatedContent:
- text: Create a new tenant in Microsoft Entra ID
url: ./create-new-tenant.md
- text: Associate or add an Azure subscription to your Microsoft Entra tenant
url: ./how-subscriptions-associated-directory.yml
- text: Find the user object ID
url: /partner-center/find-ids-and-domain-names#find-the-user-object-id