tenant info get
Gets information about any tenant
Usage
m365 tenant info get [options]
Options
-d, --domainName [domainName]The primary domain name of a tenant. Optionally specify either
domainNameortenantIdbut not both. If none are specified, the tenantId of the currently signed-in user is used.-i, --tenantId [tenantId]The unique tenant identifier of a tenant. Optionally specify either
domainNameortenantIdbut not both. If none are specified, the tenantId of the currently signed-in user is used.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
If no domain name or tenantId is specified, the command will return the tenant information of the currently signed in user.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| Microsoft Graph | CrossTenantInformation.ReadBasic.All |
| Resource | Permissions |
|---|---|
| Microsoft Graph | CrossTenantInformation.ReadBasic.All |
Examples
Get tenant information for the currently signed in user.
m365 tenant info get
Get tenant information for the Contoso tenant.
m365 tenant info get --domainName contoso.com
Get tenant information by id.
m365 tenant info get --tenantId e65b162c-6f87-4eb1-a24e-1b37d3504663
Response
- JSON
- Text
- CSV
- Markdown
{
"tenantId": "e65b162c-6f87-4eb1-a24e-1b37d3504663",
"federationBrandName": null,
"displayName": "Contoso",
"defaultDomainName": "contoso.com"
}
defaultDomainName : contoso.com
displayName : Contoso
federationBrandName : null
tenantId : e65b162c-6f87-4eb1-a24e-1b37d3504663
tenantId,displayName,defaultDomainName
e65b162c-6f87-4eb1-a24e-1b37d3504663,Contoso,contoso.com
# tenant info get
Date: 9/14/2023
## Contoso
Property | Value
---------|-------
tenantId | e65b162c-6f87-4eb1-a24e-1b37d3504663
displayName | Contoso
defaultDomainName | contoso.com