Hi @Afzal, Haroon ,
Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you would like to list your "internal facing URLs".
I am afraid I did not quite understand what you refer by internal facing URLs.
Do you mean all the custom domains that are associated with your AppGateway, FrontDoor and Load balancer.
- If you look at App gateway and Load Balancers, they are not created with a domain name in the platform
- Instead, they only have public IPs associated with them, and later, the user creates some DNS mapping to them (not necessarily always done from Azure)
- Also, they do not have any property for custom domains which we can list
- However, you should be able to list the IPs belonging to LoadBalancers and App Gateways
- Just navigate to the App gateway / Load Balancer section from the Portal, and edit the column view to display the public IP address
-
-
- The below Powershell script can help you get the IP Addresses if you are looking to automate.
For AppGateway,
$AppGws = Get-AzApplicationGateway
foreach($AppGw in $AppGws){
$FrontEndIPs= Get-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw
foreach($obj in $FrontEndIPs){
Write-Host "Name of AppGateway:" $AppGw.Name
Write-Host "ResourceGroup of AppGateway:" $AppGw.ResourceGroupName
if($obj.PrivateIPAddress){
Write-Host "PrivateIPAddress: " $obj.PrivateIPAddress
}else{
$resource = Get-AzResource -ResourceId $obj.PublicIPAddress.Id
$publicIp = Get-AzPublicIpAddress -ResourceGroupName $resource.ResourceGroupName -Name $resource.Name
Write-Host "PublicIPAddress: " $publicIp.IpAddress
Write-Host " "
}
}
}
For LoadBalancers
$LBs = Get-AzLoadBalancer
foreach($LB in $LBs){
$FrontEndIPs= Get-AzLoadBalancerFrontendIpConfig -LoadBalancer $LB
foreach($obj in $FrontEndIPs){
Write-Host "Name of Load Balancer:" $LB.Name
Write-Host "ResourceGroup of Load Balancer:" $LB.ResourceGroupName
if($obj.PrivateIPAddress){
Write-Host "PrivateIPAddress: " $obj.PrivateIPAddress
Write-Host " "
}else{
$resource = Get-AzResource -ResourceId $obj.PublicIPAddress.Id
$publicIp = Get-AzPublicIpAddress -ResourceGroupName $resource.ResourceGroupName -Name $resource.Name
Write-Host "PublicIPAddress: " $publicIp.IpAddress
Write-Host " "
}
}
}
You can further modify the above scripts to suit your requirements.
I hope this helps.
Thanks,
Kapil
----------------------------------------------------------------------------------------------------------------
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.