Edit

Share via


Get-EntraTenantDetail

Gets the details of a tenant.

Syntax

Default (Default)

Get-EntraTenantDetail

    [-All]
    [-Top <Int32>]
    [-Property <String[]>]
    [<CommonParameters>]

Description

The Get-EntraTenantDetail cmdlet gets the details of a tenant in Microsoft Entra ID.

In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation:

  • Application Administrator
  • Authentication Administrator
  • Cloud Application Administrator
  • Directory Readers
  • Directory Reviewer
  • Global Reader
  • Helpdesk Administrator
  • Security Administrator
  • Security Operator
  • Security Reader
  • Service Support Administrator
  • User Administrator
  • Privileged Role Administrator

Examples

Example 1: Get all tenant details

Connect-Entra -Scopes 'Organization.Read.All'
Get-EntraTenantDetail -All
DisplayName Id                                   TenantType CountryLetterCode VerifiedDomains
----------- --                                   ---------- ----------------- ---------------
Contoso     aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AAD        NL                {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Mana...

This example shows how to retrieve all tenant details.

Example 2: Get all licenses in the tenant

Connect-Entra -Scopes 'Organization.Read.All'
Get-EntraTenantDetail | Select-Object -ExpandProperty ProvisionedPlans
CapabilityStatus ProvisioningStatus Service                       AdditionalProperties
---------------- ------------------ -------                       --------------------
Enabled          Success            SharePoint
Enabled          Success            exchange
Enabled          Success            exchange
Enabled          Success            exchange
Enabled          Success            SCO
Enabled          Success            exchange
Enabled          Success            SharePoint
Enabled          Success            CloudPC-MX
Enabled          Success            YammerEnterprise

This example shows how to retrieve all licenses in the tenant.

Example 3: Get top one tenant details

Connect-Entra -Scopes 'Organization.Read.All'
Get-EntraTenantDetail -Top 1
DisplayName Id                                   CountryLetterCode VerifiedDomains
----------- --                                   ----------------- ---------------
Contoso     aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL                {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}}

This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. You can use -Limit as an alias for -Top.

Example 4: Get directory tenant size quota

Connect-Entra -Scopes 'Organization.Read.All'
(Get-EntraTenantDetail).AdditionalProperties.directorySizeQuota
Key   Value
---   -----
used    339
total 50000

This example shows how to retrieve the directory tenant size quota.

A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error.

Parameters

-All

List all pages.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Property

Specifies properties to be returned.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Select

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Top

Specifies the maximum number of records to return.

Parameter properties

Type:System.Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Limit

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.