You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: How to restrict your Azure Active Directory-registered app to a set of users
2
+
title: Restrict Azure AD app to a set of users | Azure
3
+
titleSuffix: Microsoft identity platform
3
4
description: Learn how to restrict access to your apps registered in Azure AD to a selected set of users.
4
5
services: active-directory
5
-
documentationcenter: ''
6
6
author: kalyankrishna1
7
7
manager: CelesteDG
8
-
editor: ''
9
8
10
9
ms.service: active-directory
11
10
ms.subservice: develop
12
11
ms.workload: identity
13
-
ms.tgt_pltfrm: na
14
-
ms.devlang: na
15
12
ms.topic: conceptual
16
13
ms.date: 09/24/2018
17
14
ms.author: kkrishna
18
-
ms.reviewer: ''
15
+
ms.reviewer: jmprieur
19
16
ms.custom: aaddev
20
-
#Customer intent: As an application developer, I want to restrict an application that I have registered in Azure AD to a select set of users available in my Azure AD tenant
21
-
ms.collection: M365-identity-device-management
17
+
#Customer intent: As a tenant administrator, I want to restrict an application that I have registered in Azure AD to a select set of users available in my Azure AD tenant
22
18
---
23
-
# How to: Restrict your app to a set of users
19
+
# How to: Restrict your Azure AD app to a set of users in an Azure AD tenant
24
20
25
21
Applications registered in an Azure Active Directory (Azure AD) tenant are, by default, available to all users of the tenant who authenticate successfully.
26
22
27
23
Similarly, in case of a [multi-tenant](howto-convert-app-to-be-multi-tenant.md) app, all users in the Azure AD tenant where this app is provisioned will be able to access this application once they successfully authenticate in their respective tenant.
28
24
29
25
Tenant administrators and developers often have requirements where an app must be restricted to a certain set of users. Developers can accomplish the same by using popular authorization patterns like Role Based Access Control (RBAC), but this approach requires a significant amount of work on part of the developer.
30
26
31
-
Azure AD allows tenant administrators and developers to restrict an app to a specific set of users or security groups in the tenant.
27
+
Tenant administrators and developers can restrict an app to a specific set of users or security groups in the tenant by using this built-in feature of Azure AD as well.
32
28
33
29
## Supported app configurations
34
30
@@ -43,22 +39,39 @@ The option to restrict an app to a specific set of users or security groups in a
43
39
44
40
## Update the app to enable user assignment
45
41
46
-
1. Go to the [**Azure portal**](https://portal.azure.com/) and sign-in as a **Global Administrator.**
42
+
There are two ways to create an application with enabled user assignment. One requires the **Global Administrator** role, the second does not.
43
+
44
+
### Enterprise applications (requires the Global Administrator role)
45
+
46
+
1. Go to the [**Azure portal**](https://portal.azure.com/) and sign in as a **Global Administrator**.
47
47
1. On the top bar, select the signed-in account.
48
48
1. Under **Directory**, select the Azure AD tenant where the app will be registered.
49
-
1. In the navigation on the left, select **Azure Active Directory**. If Azure Active Directory is not available in the navigation pane, then follow these steps:
49
+
1. In the navigation on the left, select **Azure Active Directory**. If Azure Active Directory is not available in the navigation pane, follow these steps:
50
50
51
51
1. Select **All services** at the top of the main left-hand navigation menu.
52
-
1. Type in **Azure Active Directory** in the filter search box and then select the **Azure Active Directory** item from the result.
52
+
1. Type in **Azure Active Directory** in the filter search box, and then select the **Azure Active Directory** item from the result.
53
53
54
54
1. In the **Azure Active Directory** pane, select **Enterprise Applications** from the **Azure Active Directory** left-hand navigation menu.
55
55
1. Select **All Applications** to view a list of all your applications.
56
56
57
57
If you do not see the application you want show up here, use the various filters at the top of the **All applications** list to restrict the list or scroll down the list to locate your application.
58
58
59
59
1. Select the application you want to assign a user or security group to from the list.
60
-
1. In the application's **Overview** page, select **Properties** from the application’s left-hand navigation menu.
61
-
1. Locate the setting **User assignment required?** and set it to **Yes**. When this option is set to **Yes**, then users must first be assigned to this application before being able to access it.
60
+
1. On the application's **Overview** page, select **Properties** from the application’s left-hand navigation menu.
61
+
1. Locate the setting **User assignment required?** and set it to **Yes**. When this option is set to **Yes**, users in the tenant must first be assigned to this application or they won't be able to sign-in to this application.
62
+
1. Select **Save** to save this configuration change.
63
+
64
+
### App registration
65
+
66
+
1. Go to the [**Azure portal**](https://portal.azure.com/).
67
+
1. On the top bar, select the signed-in account.
68
+
1. Under **Directory**, select the Azure AD tenant where the app will be registered.
69
+
1. In the navigation on the left, select **Azure Active Directory**.
70
+
1. In the **Azure Active Directory** pane, select **App Registrations** from the **Azure Active Directory** left-hand navigation menu.
71
+
1. Create or select the app you want to manage. You need to be **Owner** of this app registration.
72
+
1. On the application's **Overview** page, follow the **Managed application in local directory** link under the essentials in the top of the page. This will take you to the _managed Enterprise Application_ of your app registration.
73
+
1. From the navigation blade on the left, select **Properties**.
74
+
1. Locate the setting **User assignment required?** and set it to **Yes**. When this option is set to **Yes**, users in the tenant must first be assigned to this application or they won't be able to sign-in to this application.
62
75
1. Select **Save** to save this configuration change.
63
76
64
77
## Assign users and groups to the app
@@ -72,6 +85,14 @@ Once you've configured your app to enable user assignment, you can go ahead and
72
85
A list of users and security groups will be shown along with a textbox to search and locate a certain user or group. This screen allows you to select multiple users and groups in one go.
73
86
74
87
1. Once you are done selecting the users and groups, press the **Select** button on bottom to move to the next part.
88
+
1. (Optional) If you have defined App roles in your application, you can use the **Select role** option to assign the selected users and groups to one of the application's roles.
75
89
1. Press the **Assign** button on the bottom to finish the assignments of users and groups to the app.
76
90
1. Confirm that the users and groups you added are showing up in the updated **Users and groups** list.
77
91
92
+
## More information
93
+
94
+
-[How to: Add app roles in your application](https://docs.microsoft.com/azure/active-directory/develop/howto-add-app-roles-in-azure-ad-apps)
95
+
-[Add authorization using app roles & roles claims to an ASP.NET Core web app](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/5-WebApp-AuthZ/5-1-Roles)
96
+
-[Using Security Groups and Application Roles in your apps (Video)](https://www.youtube.com/watch?v=V8VUPixLSiM)
97
+
-[Azure Active Directory, now with Group Claims and Application Roles](https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Azure-Active-Directory-now-with-Group-Claims-and-Application/ba-p/243862)
98
+
-[Azure Active Directory app manifest](https://docs.microsoft.com/azure/active-directory/develop/reference-app-manifest)
0 commit comments