Quantcast
Channel: SharePoint Pals - PowerShell
Viewing all articles
Browse latest Browse all 31

How to Get the Tenant ID of Office 365

$
0
0

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.


Viewing all articles
Browse latest Browse all 31

Trending Articles