How to limit access to a web app domain (http://www.website.com) to a only certain users or group in a company?

Lacy 20 Reputation points
2023-08-11T12:59:18.3166667+00:00

The company has set up an App Service (web app) in Azure. To authenticate to the web app, a identity provider is already set up for the people in the company.

Role base access control (RBAC) is already implemented so that only certain users can make changes in the resource. However, the RBAC does not seem to apply to the web app domain and everyone in the company are still able to enter the link. I only want a certain group of people in the company to have access to the web app domain, how can I achieve that?

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

Accepted answer
  1. ajkuma 27,946 Reputation points Microsoft Employee
    2023-08-14T18:54:24.85+00:00

    @Lacy ,

    Based on your scenario description, you want to have only a few users be able to access the Azure WebApp (with custom domain) in your Azure AD tenant.

    In this case, based on your requirement, to limit access to your web app domain to only certain users or groups in your company, you may use Azure Active Directory (Azure AD) to authenticate and authorize users instead of RBAC roles. Here are the high-level steps to achieve this:

    1.    Configure your web app to use Azure AD for authentication.

    2.    Create a security group in Azure AD for the users who should have access to the web app.

    3.    Configure your web app to use Azure AD for authorization and restrict access to the security group.

    With these steps, only the users who are members of the security group you created will be able to access your web app domain. Other users in your company will be denied access.

    Authentication and authorization in Azure App Service and Azure Functions

    Kindly let us know how it goes, we will follow-up further.


    If the answer helped (pointed, you in the right direction) > please click Accept Answer

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.