Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darrenjrobinson/AzureADTenantID
Signed PowerShell module to lookup a domain name and return the associated Azure Active Directory Tenant ID.
https://github.com/darrenjrobinson/AzureADTenantID
Last synced: about 2 months ago
JSON representation
Signed PowerShell module to lookup a domain name and return the associated Azure Active Directory Tenant ID.
- Host: GitHub
- URL: https://github.com/darrenjrobinson/AzureADTenantID
- Owner: darrenjrobinson
- Created: 2021-06-13T05:54:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-21T00:17:13.000Z (over 1 year ago)
- Last Synced: 2024-08-03T05:01:44.457Z (5 months ago)
- Language: PowerShell
- Size: 20.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: ReadME.md
Awesome Lists containing this project
- awesome-entra - AzureADTenantID - PowerShell module to retrieve the TenantID for an Azure AD Tenant. [![stars](https://badgen.net/github/stars/darrenjrobinson/AzureADTenantID)](https://badgen.net/github/stars/darrenjrobinson/AzureADTenantID) (Tools / CLI)
README
# Find an Azure Active Directory Tenant ID and/or Custom Domains using a registered Domain Name
[![PSGallery Version](https://img.shields.io/powershellgallery/v/AzureADTenantID.svg?style=flat&logo=powershell&label=PSGallery%20Version)](https://www.powershellgallery.com/packages/AzureADTenantID) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/AzureADTenantID.svg?style=flat&logo=powershell&label=PSGallery%20Downloads)](https://www.powershellgallery.com/packages/AzureADTenantID)
## Description
Signed PowerShell module to
- lookup a domain name and return the associated Entra ID (Azure Active Directory) Tenant ID
- query ExchangeOnline for Registered Domains## Features
- Queries the 'Well-Known' Entra ID (Azure AD) Open ID Connect (OIDC) Authorization Endpoint using a domain name and returns the TenantId
- Queries the Exchange Online Autodiscovery service using a domain name and returns all other registered domains.
- Aliases for new Entra ID naming Get-AzureADTenantId == Get-EntraIDTenantId AND Get-AzureADCustomDomains == Get-EntraIDCustomDomains
- Works with Windows PowerShell and PowerShell (6.x+)## Installation
Install from the PowerShell Gallery on Windows PowerShell 5.1+ or PowerShell Core 6.x or PowerShell.```
Install-Module -name AzureADTenantID
```## How to use
### Entra ID (AAD) Tenant ID
```
Get-AzureADTenantId -domain 'microsoft.com'
or
Get-EntraIDTenantId -domain 'microsoft.com'
```or
```
'microsoft.com' | Get-AzureADTenantId
or
'microsoft.com' | Get-EntraIDTenantId
```### Exchange Online Domains (which usually infers EntraID (AAD) custom domains so that email and UPN matches for users.)
Defaults to WW Cloud
```
Get-AzureADCustomDomains -domain 'microsoft.com'
or
Get-EntraIDCustomDomains -domain 'microsoft.com'
```For GCC-H use the -GCCH switch
```
Get-AzureADCustomDomains -domain 'microsoft.com' -GCCH
or
Get-EntraIDCustomDomains -domain 'microsoft.com' -GCCH
```or
```
'microsoft.com' | Get-AzureADCustomDomains
or
'microsoft.com' | Get-EntraIDCustomDomains
```## Keep up to date
* [Visit my blog](https://blog.darrenjrobinson.com)
* ![](http://twitter.com/favicon.ico) [Follow darrenjrobinson](https://twitter.com/darrenjrobinson)