Microsoft Teams and Skype for Business thoughts and news

Tom Arbuthnot MVP
Tom Arbuthnot MCSM Communications

This site uses cookies

Find this blog useful? Please take a second to share, thanks!

How to get your Office 365 Tenant Name and Tenant ID

Published 24/09/2015 - 14 Comments

Office 365 tenant have a tenant name and alphanumeric tenant ID, often when people ask for the tenant ID, they may just want the tenant name, but either way, here is how to find both:

Tenant Name

Your tenant name is the name specified when you sign up in the format: company.onmicrosoft.com, you can usually find it in your company profile

SNAGHTML1ec83d9d

 

Or domain Options:

image

 

To find it with PowerShell, first, install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW from the Microsoft Download Center. Then install the Azure Active Directory Module for Windows PowerShell (64-bit version), and click Run to run the installer package.

Run PowerShell as Administrator, and run Connect-MsolService, you will be prompted for your credentials

image

Get-MsoAccountSku, the first element of the AccountSkuID is the tennant ID.

image

Alphanumeric Office 365 Tenant ID

You can find your tenant ID in the Azure AD portal. You’ll need to be an Azure AD administrator.

Find your Office 365 Tenant ID in the Azure AD portal

Under Azure Active Directory / Properties, see Directory ID

Find your Office 365 Tenant ID on the Office 365 Admin Center under the SharePoint Admin Portal

apps / app permissions

It’s the number behind the “@”

 

 

Find your Office 365 Tenant ID via PowerShell

Thanks, Office 365 Tech Expert in comments. See above to get your tenant name

(Invoke-WebRequest https://login.windows.net/YOUROFFICE365DOMAINNAME.onmicrosoft.com/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split(‘/’)[3]

Tom Arbuthnot

Tom Arbuthnot

Principal Solutions Architect at Modality Systems
Tom Arbuthnot is Principal Solutions Architect at Unified Communications specialist Modality Systems. He is a Microsoft Certified Master and MVP, blogger, has a regular podcast with UCToday at tomtalks.show and is a regular speaker at events including Microsoft TechEd and Ignite. He co-runs The Microsoft UC User Group London.

14 comments

Rich - 24/06/2016 Reply

Thats not the tenant ID. The tenant ID is a alpha-numeric unique Identifier.

    Tom Arbuthnot - 26/06/2016 Reply

    I’ve signed up for a few things (TAP/Preview) asking for the “tenant ID” and it’s been that, how do you get the alpha-numeric you’re talking about?

    thanks

      Tom Arbuthnot - 03/07/2016 Reply

      Thanks for comment, looked into this further and have added details for the alpha-numeric ID :-)

Office 365 Tech Expert - 30/06/2016 Reply

Run this powershell script the output will give you the tenant ID

(Invoke-WebRequest https://login.windows.net/YOUROFFICE365DOMAINNAME.onmicrosoft.com/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split(‘/’)[3]

    Tom Arbuthnot - 03/07/2016 Reply

    Great option, thanks! have added to the post

    asdasd - 17/01/2017 Reply

    FOR THE LOVE OF GOD- THANK YOU. I’ve been searching the net for ages, and all google gives me is azure bullshit, thank you so much from the deepest of my heart. How hard can it be to simply provide such info easily via technet hah..

Mike Adkins - 19/07/2016 Reply

Hello,

Thanks for the info – it really helped. After using your method I was digging around on TechNet for S4B client policy information that can be queried by TenantID and I located the following powershell command

Get-CsTenant | Select-Object DisplayName, TenantID

This requires a S4B PS remote session to use:

$credential = Get-Credential
Import-Module SkypeOnlineConnector
$sfboSession = New-CsOnlineSession -Credential $credential
Import-PSSession $sfboSession

    Tom Arbuthnot - 21/07/2016 Reply

    Nice, thanks for sharing the method!

    Tom

Meneghino - 22/02/2017 Reply

Thank you for the SharePoint apps solution, magic!

Eric Routhier - 09/02/2018 Reply

Good article!

My team really got sick of trying to find the tenant Id for our O365 and Azure projects. The devs, the support team, the sales team, everyone needs it at some point and never remembers how to do it.

So we build this helper site in the same vein as whatismyip.com. Hope you find it useful!

https://www.whatismytenantid.com

Talha - 20/02/2018 Reply

Hi Tom,

Thanks for posting this.

It was a quick help.

Talha.

Leave a Reply:


close

Weekly Email Update 
of all the key 
Microsoft Teams and Skype for Business News
every Tuesday

No Spam ever, I promise - Tom