Hi @MrFlinstone ,
Thanks for reaching out to Microsoft Q&A.
To limit public access to the service configuration endpoints in Azure API Management (APIM), you need to set up your APIM instance so that only certain networks can access it.
This means you can control who can reach the APIM management endpoints, including the service configuration endpoints, by setting up a virtual network (VNet) and adjusting the network security settings.
Here is the reference document for Vnet Configuration: https://learn.microsoft.com/en-us/azure/api-management/api-management-using-with-internal-vnet?tabs=stv2
As per your concern to check if the public access is enabled or not using the power shell use the below command but make sure that you have logged in to Azure account and check external access settings after that use the below code in PowerShell:
if ($apim.Networking.PublicNetworkAccess -eq "Enabled") {
Write-Output "Public access is enabled for the APIM instance."
} else {
Write-Output "Public access is disabled for the APIM instance."
}
Hope this helps, do let me know if you have any further questions.
Thankyou.