Listing all public URLs from an Azure tenant involves retrieving information about all the services in that tenant which have public endpoints. It's important to note that Azure does not provide a direct way to list all public URLs, but you can manually retrieve this information from various services.
Here are the steps to get public URLs from some common services in Azure:
- Azure App Services (Web apps, API apps, Mobile apps, Function apps)
In the Azure portal, go to each App Service and look for the 'URL' in the Overview section. The URL is usually in the format "{app_name}.azurewebsites.net".
- Azure SQL Databases
Go to each SQL Database in Azure portal, under Settings, click 'Show database connection strings'. You will find the server URL in the connection strings. The URL is usually in the format "{server_name}.database.windows.net".
- Azure Storage Accounts
Go to each Storage Account in Azure portal, under Settings, click 'Properties'. You will find the Storage account name, blob service URL, file service URL, queue service URL, table service URL.
- Azure Virtual Machines
Go to each Virtual Machine in Azure portal, under Settings, click 'Overview'. If there is a public IP address assigned to the VM, you can use the DNS name (if configured) or the IP address as the URL.
- Azure Kubernetes Service (AKS)
In the Azure portal, go to the AKS service and then to the 'Kubernetes services' section. If there are any services of type 'LoadBalancer', their external IP addresses can be used as public URLs.
- Azure API Management
In the Azure portal, go to each API Management service, under Settings, click 'Overview'. The API Management service URL is listed in the 'Gateway URL' section.
In order to automate this process, you will need to write a script using Azure CLI or PowerShell to iterate over all resources in your Azure tenant and retrieve the public URLs.
Please note that not all services in Azure have public URLs, and some services may need additional configuration to expose a public endpoint. Always be mindful of the security implications when exposing a public endpoint.