How do I grant access to App Service app to specific GitHub users when using GitHub as the Identity Provider (Linux)

Charles William 0 Reputation points
2023-07-22T21:52:20.19+00:00

I have set up Authentication on my web app using App Service (Basic B2 instance) on Linux.

I have set the Identity Provider to GitHub and it is working - users get presented with a GitHub login screen and access to the app is granted as expected when valid GitHub credentials are entered.

Within GitHub I can see user tokens granted as expected.

However this means that anyone with a GitHub account can access the app - how can I limit access to specific GitHub users?

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

1 answer

Sort by: Most helpful
  1. ajkuma 27,946 Reputation points Microsoft Employee
    2023-07-24T20:01:35.8433333+00:00

    Based on my understanding of your question/scenario description, you may try the following if your requirement fits - To limit access to specific GitHub users when using GitHub as the Identity Provider for your App Service app, you may leverage Azure Active Directory (Azure AD) to manage access to your app.

    1. Add users to Azure AD: In the Azure portal, go to your Azure AD tenant and click on "Users". Click on "New user" to add a new user to Azure AD. You may also invite existing GitHub users to join your Azure AD tenant.
    2. Assign users to the app: In the Azure portal, go to your Azure AD tenant and click on "Enterprise applications". (Click on the application you created). Click on "Users and groups" and then click on "Add user/group". Select the users or groups that you want to grant access to your app and click on "Select". Choose the appropriate role for the users or groups (e.g. "User" or "Contributor") and click on "Assign".

    Ref:

    Configure your App Service or Azure Functions app to use GitHub login
    Quickstart: Add an enterprise application

    Kindly let us know, I'll follow-up with you further.

    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.