Forum Discussion
Vik0911
Jan 30, 2023Copper Contributor
Restrict users to access Web App hosted on Azure
Hi All,
I am new to azure and need help.
I have created a Web Application in .Net and hosted on Azure and currently it can access by anyone in the organization, I want to restrict users to access the application.
Thanks,
Vikas Deshmukh
- ChrisBradshawIron ContributorHi Vikas,
I'm assuming everyone in your organisation has an AD login, if so you can do this by turning on authorisation and then assigning users to the app.
First you will need to enable authentication for your Web App if you haven't already done so:
https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad
Once this is setup, all users in your organisation will need to login to access the application.
The next step is to restrict users, you can do this using the "Assignment required" option in the Enterprise Application which is created when you enabled AD authentication, and then assigning users/groups to that app. Some details here:
https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users
Hope this helps.
Chris,