0
votes

Before deleting a custom domain from Azure Active Directory (AAD), I first need to get a list of all users, groups, and applications that reference that custom domain. This can be done manually through the Azure portal

enter image description here enter image description here

Is there a way to get this list through PowerShell? I see the PowerShell cmdlet Get-MsolDomain, but I do not see that this outputs this kind of information.

1

1 Answers

0
votes

I recommend to use cmdlet Get-AzureADDomainNameReference -Name '' from module AzureAD.

You can install that module from PowerShell Gallery - https://www.powershellgallery.com/packages/AzureAD/