How to Get the Tenant ID of Office 365

Sathish Nadarajan
SharePoint MVP
Published On :   28 Mar 2018
Visit Count
Today :  1    Total :   624
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial

In this article, let us see how to get the Tenant ID of our Office 365 Tenant.

Option 1 – Through the Screen

1. Get from the Azure Active Directory Properties.

2. Go to the Admin Portal and Click on the Azure Active directory -


3. On the Azure Active Directory page, the properties will be displayed as below. The Value on the Directory ID is the Tenant ID. Make a note of this and we can use wherever we want.


Option 2 – By PowerShell Script

 #Install the Microsoft Online Module
 Install-Module MSOnline
 #Get the Credentials and connect with the Tenant
 $UserCredential = Get-Credential
 Connect-MsolService -Credential $UserCredential
 #Get the Tenant ID
 Get-MSOLCompanyInformation | select objectID 

When we try to install the MSOnline module for the first time, it will prompt the below screen and give Yes in it.


Happy Coding,

Sathish Nadarajan.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.

Protect Your SharePoint