> ## Content Index
> Fetch the complete content index at: https://blog.lsonline.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to get your Microsoft 365 Tenant ID
- URL: https://blog.lsonline.fr/2019/09/02/how-to-get-your-microsoft-365-tenant-id/
- Published: 2019-09-02T22:03:00.000Z
- Updated: 2026-01-27T18:53:02.000Z
- Description: You need to retrieve your Microsoft 365 Tenant ID but you do not know how? Here, some ways to find it!
- Author: Laurent Sittler
- Tags: Microsoft 365, PowerShell, SharePoint, CLI for Microsoft 365, Microsoft Teams, Power Automate

> Update 2019-09-09: Add SharePoint REST API

What is a Tenant ID? When you subscribe to Microsoft 365, Microsoft provides you a full environment with several services (SharePoint, Teams, Azure Active Directory, etc.). In order to link all of these services between them and on your environment, they use a unique identifier which is your Tenant ID.

The Tenant ID is represented as GUID: `00000000-0000-0000-0000-000000000000`

Generally, you do not need to know your Tenant ID but sometimes, essentially for the developers or when your company needs to deploy an app (ex: enable PowerBI **Microsoft 365 Usage Analytics*)*, you need to.

How to retrieve your Tenant ID? Here, some ways to find it!

## Azure Active Directory

By default, all the users of your company have access to the [Azure Portal](https://portal.azure.com/?ref=blog.lsonline.fr).

Once you are connected to your [https://portal.azure.com](https://portal.azure.com/?ref=blog.lsonline.fr), click on `Azure Active Directory`, then `Properties` and this is the Directory ID

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-AAD.jpg)

Get Microsoft 365 Tenant ID from Azure portal

## Microsoft 365 Admin Center

> \[note\]**Note**  
>  
> For the users accounts with at least the Reports reader role

Once you are connected to your [https://admin.microsoft.com](https://admin.microsoft.com/?ref=blog.lsonline.fr), expand `Reports` from the left navigation and click on `Usage`. At the bottom of the page, you should find the **Microsoft 365 usage analytics** with your Tenant ID.

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-M365AdminCenter-1.jpg)

Get Microsoft 365 Tenant ID from Microsoft 365 Admin Center

## SharePoint Admin Center (App permissions)

> \[note\]**Note**  
>  
> For SharePoint administrators only

Once you are connected to your SharePoint Admin Center (`https://yourdomain-admin.sharepoint.com`), click on `Classic features` from the left navigation, then click on `Open` under ***Apps*** section and click on `App Permissions` (last link).

On this page, you will see some Apps with a unique identifiers. Each identifier contains a claim with an ID followed by an *at ("@")* and your Tenant ID (ex: *i:0i.t|ms.sp.ext|00000000-0000-0000-0000-000000000000@YOURTENANTID*)

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-SPADMCenter.jpg)

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-FromSPAppPermissions.jpg)

Get Microsoft 365 Tenant ID from SharePoint Admin Center

## SharePoint site

It is a little bit more complex to find the Tenant ID from a SharePoint site but you can do it too.

### Web Inspector

Open any modern SharePoint site (or classic) and open the *Web Inspector / Web Developer Console*

- On **Windows**, it is generally ***F12***
- On **MAC OS X**, it is generally ***CMD + OPTION + i***

Once opened, launch a search on "**siteSubscriptionId**"

- On **Windows**: ***CTRL + F***
- On **MAC OS X**: ***CMD + F***

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-FromSPSite.jpg)

Get Microsoft 365 Tenant ID from SharePoint site

### Rest API URL

Firstly, open your favorite web browser and go to any SharePoint site collection then, edit the URL like this:

```plaintext
https://contoso.sharepoint.com/sites/mysite/_api/SP.UserProfiles.PeopleManager/GetMyProperties
```

> \[note\]**Note**  
>  
> Replace `contoso` by your own domain name.

the result will be a little bit huge... But perform a search on "**SPS-DistinguishedName**":

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-SPRestApi.jpg)

Get Microsoft 365 Tenant ID from SharePoint REST API

here an example of the value (the first `OU` correspond to your Tenant ID):

```Plaintext
CN=00000000-1111-2222-3333-444444444444,OU=[YOUR TENANT ID],OU=Tenants,OU=MSOnline,DC=SPODS0123456789,DC=msoprd,DC=msft,DC=net
```

## Teams

All the users who have a *Microsoft Teams* license can reach their [https://portal.office.com](https://portal.office.com/?ref=blog.lsonline.fr) and click on the *Teams* *tile or access it directly from their Desktop application.*

Once connected to the application (web or desktop), you can show your Tenant ID by sharing:

- Team
- Channel

Click on the ellipsis on the right of Team or Channel and click on `Get a link ...`; at the end of the URL, you will see your Tenant ID.

![](https://blog.lsonline.fr/content/images/2019/09/Screen-Shot-2019-09-04-at-12.24.18.png)

![](https://blog.lsonline.fr/content/images/2019/09/Screen-Shot-2019-09-04-at-12.24.33.png)

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-MSTeamLinkTeam.jpg)

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-MSTeamLinkChannel.jpg)

Get Microsoft 365 Tenant ID from Microsoft Teams Team and Channel

## PowerApps

All the users who have a PowerApps license can reach their [https://portal.office.com](https://portal.office.com/?ref=blog.lsonline.fr) and click on the *PowerApps* *tile*.

Once redirected to the **PowerApps home page**, the Tenant ID is visible from the URL.

![](https://blog.lsonline.fr/content/images/2019/09/Screen-Shot-2019-09-04-at-11.33.11.png)

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-FromPowerApps.jpg)

Get Microsoft 365 Tenant ID from PowerApps

## Flow

All the users who have a *Microsoft Flow* license can reach their [https://portal.office.com](https://portal.office.com/?ref=blog.lsonline.fr) and click on the *Flow* *tile*.

Once redirected to the **Microsoft Flow home page**, click on `My Flows` from the left navigation, and the Tenant ID is visible from the URL.

![](https://blog.lsonline.fr/content/images/2019/09/Screen-Shot-2019-09-04-at-19.05.07.png)

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-FromFlow.jpg)

Get Microsoft 365 Tenant ID from Microsoft Flow

## Stream

> \[note\]**Note**  
>  
> For Stream administrators only

All the users who have a *Microsoft Stream* license, can reach their [https://portal.office.com](https://portal.office.com/?ref=blog.lsonline.fr) and click on the *Stream* *tile or directly from the URL* [*https://web.microsoftstream.com/*](https://web.microsoftstream.com/?ref=blog.lsonline.fr).

Once redirected to the **Microsoft Stream home page**, click on **Settings** (gear) from *Microsoft 365 top bar* then, click on `Admin settings` link.

From the left navigation, expand `Manage Stream` and click on `eCDN provider`.

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-Stream.jpg)

Get Microsoft 365 Tenant ID from Microsoft Stream

---

## Office365-CLI

Once `[logged](https://pnp.github.io/office365-cli/cmd/login/?ref=blog.lsonline.fr)` to your environment, the following command will return your Tenant ID:

```bash
tenant id get --domainName mydomain.onmicrosoft.com
```

and the result is:

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-Office365-CLI-2.jpg)

Get Microsoft 365 Tenant ID with Office365-CLI

## Azure CLI

The only thing you have to do is to connect into your environment with the following command:

```PowerShell
az login
```

once connected, the result is:

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-AzureCLI.jpg)

Get Microsoft 365 Tenant ID with Azure CLI

## Azure Active Directory PowerShell

The only thing you have to do is to connect into your environment with the following cmdlet:

```PowerShell
$AzCreds = Get-Credential
Connect-AzureAD -Credential $AzCreds
```

and the result is:

![](https://blog.lsonline.fr/content/images/2019/09/LsOnline-GetTenantID-FromAzPowerShell.jpg)

Get Microsoft 365 Tenant ID with Azure Active Directory PowerShell module

## SPFx

For the developers who need to use the Tenant ID in their SharePoint Framework components, you will find it like that:

```JavaScript
this.context.pageContext.aadInfo.tenantId._guid
```
  
  
Hoping this post will help you ?