tenant id get
Gets Microsoft 365 tenant ID for the specified domain
Usage
m365 tenant id get [options]
Options
-d, --domainName [domainName]The domain name for which to retrieve the Microsoft 365 tenant ID
-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 is specified, the command will return the tenant ID of the tenant to which you are currently logged in.
Permissions
- Delegated
- Application
The command doesn't require any permissions.
The command doesn't require any permissions.
Examples
Get Microsoft 365 tenant ID for the specified domain
m365 tenant id get --domainName contoso.com
Get Microsoft 365 tenant ID of the the tenant to which you are currently logged in
m365 tenant id get
Response
- JSON
- Text
- CSV
- Markdown
"e65b162c-6f87-4eb1-a24e-1b37d3504663"
e65b162c-6f87-4eb1-a24e-1b37d3504663
e65b162c-6f87-4eb1-a24e-1b37d3504663
e65b162c-6f87-4eb1-a24e-1b37d3504663