How to Get the Tenant ID of Office 365

Sathish Nadarajan
 
Solution Architect
March 28, 2018
 
Rate this article
[Total: 0    Average: 0/5]
 
Views
2538

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 – https://portal.office.com/adminportal/home#/homepage

clip_image002

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.

clip_image004

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.

clip_image006

Happy Coding,

Sathish Nadarajan.

Category : Office 365, SharePoint

Author Info

Sathish Nadarajan
 
Solution Architect
 
Rate this article
[Total: 0    Average: 0/5]
 
Sathish is a Microsoft MVP for SharePoint (Office Servers and Services) having 13+ years of experience in Microsoft Technologies. He holds a Masters Degree in Computer Aided Design and Business ...read more
 

Leave a comment