Azure App Service - Restrict Users Access to specific url endpoints of the web app (i.e. /admin)

Arman Avetisyan 0 Reputation points
2023-10-24T00:35:20.0833333+00:00

I've deployed a web app on Azure App Service. I need to restrict access to specific url endpoints. For example, I need to allow access to /admin url only from specific IP address (or address range). I've tried to use the Access REstriction functionality but it allows to restrict access to the entire web app and only for specific url addresses.

Is there a way to do it from Azure App Service?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-10-24T04:17:23.47+00:00

    Hi @Arman Avetisyan

    Unfortunately, Azure App Service’s Access Restriction feature only allows you to restrict access to the entire web app, but not to specific URL addresses.

    However, you can try to achieve the scenario with two options:

    • Use Application Gateway or FrontDoor resources in Azure to filter domain names or URLs.
    • Use Service Endpoints. With service endpoints, to ensure inbound traffic to your API app comes only from the subnet used by your web app. The process for setting service endpoints is similar to the process for setting IP access restrictions. You can build an allow/deny list of access rules that includes public addresses and subnets in your virtual networks.

    If you like to see this functionality supported on App Service in the future you can share your feedback with the App service engineering team here.

    Best,

    Grace


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.