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.

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

1 Response

Leave a Reply

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

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading