Skip to content

How to get your Office 365 Tenant Name and Tenant ID

Office 365 tenants 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. Your “Directory ID” is another name for your Tenant ID. It’s the same.

image

image

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 the comments. See above to get your tenant’s name

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

Published inOffice365

18 Comments

    • asdasd asdasd

      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..

  1. Mike Adkins Mike Adkins

    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

  2. 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

Leave a Reply

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