Microsoft Quietly Closes Another Loophole for Tenant Domain Enumeration

In Microsoft’s continuous effort to harden Microsoft 365 against reconnaissance, Microsoft have quietly made a deliberate backend change to prevent unauthenticated tenant domain enumeration via the legacy Azure Access Control Service (ACS) metadata endpoint.

Previously, services like my TenantDomainFinder, could query the https://accounts.accesscontrol.windows.net/${tenantName}/metadata/json/1 metadata endpoint without any authentication. By sending a simple GET request, the service would return a JSON response containing an allowed_audiences array. This array conveniently listed all verified domains tied to that specific organisation’s Microsoft 365 tenant.

This OSINT vector is now firmly closed it seems. Microsoft has scrubbed this data from the unauthenticated response entirely. If you attempt to query the endpoint today, the allowed_audiences array returns empty, effectively killing its utility Intelligence gathering. No amount of header manipulation or client spoofing will force the backend to reveal this data…

This update follows a similar recent change to the Exchange Online Autodiscover service (which historically powered the Get-FederationInformation cmdlet). This change signals the clear defensive strategy by Microsoft to shut down domain mapping across all legacy endpoints.

From a security standpoint, this is a positive change. Unauthenticated domain enumeration gives attackers the ability to identify lesser secure domains which could otherwise be used to evade security controls across mail and authentication. For legitimate administrators, you should now instead use Microsoft Graph to query your domains which requires authentication with the “Domain.Read.All” permission.

I’m sure the security community will continue to search for alternative methods to enumerate domains while authenticated, if a method has not already been found.

Daniel Bradley

Daniel Bradley is a UK-based technical architect and Microsoft MVP in Security. He specialises in Microsoft Entra, Intune, and Microsoft Graph PowerShell and is the author of Microsoft Graph PowerShell for Administrators. He writes and edits Our Cloud Network using experience gained from working with Microsoft cloud environments.

Leave a Reply