Restricting API Management to disable public network access to the service configuration endpoints

MrFlinstone 641 Reputation points
2024-12-13T17:47:47.68+00:00

Looking at Azure APIM and want to restrict service configuration endpoints from public access as detailed on here.

https://www.azadvertizer.net/azpolicyadvertizer/7ca8c8ac-3a6e-493d-99ba-c5fa35347ff2.html

Unsure where the configuration section is within APIM, and is it possible to have a PowerShell script to check if public access is enabled on the service configuration endpoints.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,238 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina (Quadrant Resource LLC) 570 Reputation points Microsoft Vendor
    2024-12-17T10:57:30.39+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.