Reputation: 1677
I'm building a web app that uses Azure Active Directory has a signin method. In Azure, I'm looking to restrict the access to my app to only a specific group of users. I can't find how to do this in the Azure portal and would appreciate some pointers.
Here's my setup. I want to restraint access of My Application to only users that are members of Group 1.
Upvotes: 3
Views: 11065
Reputation: 426
Although its been a few years since this question was asked, maybe this answer helps someone with the same problem.
I think the best solution would be to follow the steps from this post: https://edi.wang/post/2019/12/13/how-to-allow-only-selected-users-to-access-an-application-in-azure-ad.
Quick summary of the steps after creating the app registration:
Upvotes: 8
Reputation: 4438
For a simple single active directory scenario with a paid-for AAD instance (which is what allows you to use groups) you can use the Authentication/Authorization option on the web blade to turn on automatic auth and then use the web app registration to grant the group access. This is a fairly decent write up.
In a multi-tenant scenario you can take the programmatic approach by modifying the app registration manifest file to include security groups and then check membership on the fly as users log in. Here is an official MS sample.
Upvotes: 2