Office 365 – One more possible way to get Tenant Id using Microsoft Active Directory Module for Windows PowerShell

Hi All,

In couple of previous articles, we discussed about Office 365 Tenant, Tenant Id – how to get using PowerShell cmdlets, Tenant Id – how to get using SharePoint admin center, Tenant Id – how to get from Azure Active Directory admin center.

Office 365 – Tenant Name and Tenant Region

Office 365 – Tenant Id – Here we discussed how to get Tenant Id using PowerShell cmdlets.

Office 365 – Getting Tenant Id from SharePoint admin center – Here we discussed how to get Tenant Id using SharePoint admin center

Office 365 – Getting Tenant Id from Azure Active Directory admin center – Here we discussed how to get Tenant Id using Azure Active Directory admin center

In this article we will discuss one more way to get Tenant Id using “Microsoft Azure Active Directory Module for Windows PowerShell”.

In windows, open the “Microsoft Azure Active Directory Module for Windows PowerShell”. If it’s not downloaded, then please check the details here.

Once “Microsoft Azure Active Directory Module for Windows PowerShell” opened, please use following cmdlet

Connect-AzureAD

As we hit the above cmdlet, “Sign in to your account” dialog box appears as

sign in dialog box
Fig 1 : “Sign in to your account” dialog, sign in with your O365 account

Please Sign in with your O365 account, once we signed in successfully we get following details

Account, Environment, TenantId, TenantDomain, AccountType as

connectazureid
Fig 2 – Output of “Connect-AzureAD” PowerShell cmdlet. We are getting TenandId in third column

So, from the “Connect-AzureAD” cmdlet also we get the Tenant Id.

References:

Azure Active Directory Cmdlets

Installing the Windows Azure AD Module for Windows PowerShell

Connect-AzureAD

Thanks for reading 🙂

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.

Stay tuned on Knowledge-Junction, will come up with more such articles / news.

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.