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
#customer intent: As an admin, I want to manage user assignment for an app in Azure Active Directory using PowerShell
17
17
---
18
18
19
-
# Assign users and groups to an application
19
+
# Manage users and groups assignment to an application
20
20
21
21
This article shows you how to assign users and groups to an enterprise application in Azure Active Directory (Azure AD) using PowerShell. When you assign a user to an application, the application appears in the user's [My Apps](https://myapps.microsoft.com/) portal for easy access. If the application exposes app roles, you can also assign a specific app role to the user.
22
22
@@ -36,13 +36,16 @@ To assign users to an enterprise application, you need:
36
36
- One of the following roles: Global Administrator, Cloud Application Administrator, Application Administrator, or owner of the service principal.
37
37
- Azure Active Directory Premium P1 or P2 for group-based assignment. For more licensing requirements for the features discussed in this article, see the [Azure Active Directory pricing page](https://azure.microsoft.com/pricing/details/active-directory).
38
38
39
-
39
+
## Assign users, and groups, to an application
40
+
40
41
:::zone pivot="portal"
41
42
42
43
To assign a user or group account to an enterprise application:
43
44
44
-
1. Sign in to the [Azure portal](https://portal.azure.com), then select **Enterprise applications**, and then search for and select the application to which you want to assign the user or group account.
45
-
1. Browse to **Azure Active Directory** > **Users and groups**, and then select **Add user/group**.
45
+
1. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com) as at least a [Cloud Application Administrator](../roles/permissions-reference.md#cloud-application-administrator).
1. Enter the name of the existing application in the search box, and then select the application from the search results.
48
+
1. Select **Users and groups**, and then select **Add user/group**.
46
49
47
50
:::image type="content" source="media/add-application-portal-assign-users/assign-user.png" alt-text="Assign user account to an application in your Azure AD tenant.":::
48
51
@@ -51,12 +54,18 @@ To assign a user or group account to an enterprise application:
51
54
1. Select **Select**.
52
55
1. On the **Add Assignment** pane, select **Assign** at the bottom of the pane.
53
56
57
+
## Unassign users, and groups, from an application
58
+
59
+
1. Follow the steps on the [Assign users, and groups, to an application](#assign-users-and-groups-to-an-application) section to navigate to the **Users and groups** pane.
60
+
1. Search for and select the user or group that you want to unassign from the application.
61
+
1. Select **Remove** to unassign the user or group from the application.
62
+
54
63
:::zone-end
55
64
56
65
:::zone pivot="aad-powershell"
57
66
58
67
1. Open an elevated Windows PowerShell command prompt.
59
-
1. Run `Connect-AzureAD -Scopes "Application.Read.All", "Directory.Read.All", "Application.ReadWrite.All", "Directory.ReadWrite.All"` and sign in with a Global Administrator user account.
68
+
1. Run `Connect-AzureAD` and sign in as at least a [Cloud Application Administrator](../roles/permissions-reference.md#cloud-application-administrator).
60
69
1. Use the following script to assign a user and role to an application:
61
70
62
71
```powershell
@@ -118,7 +127,8 @@ This example assigns the user Britta Simon to the Microsoft Workplace Analytics
118
127
## Unassign users, and groups, from an application
119
128
120
129
1. Open an elevated Windows PowerShell command prompt.
121
-
1. Run `Connect-AzureAD -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"` and sign in with a Global Administrator user account. Use the following script to remove a user and role from an application.
130
+
1. Run `Connect-AzureAD` and sign in as at least a [Cloud Application Administrator](../roles/permissions-reference.md#cloud-application-administrator).
131
+
1. Use the following script to remove a user and role from an application.
1. Open an elevated Windows PowerShell command prompt.
168
-
1. Run `Connect-MgGraph -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"` and sign in with a Global Administrator user account.
178
+
1. Run `Connect-MgGraph -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"` and sign in as at least a [Cloud Application Administrator](../roles/permissions-reference.md#cloud-application-administrator).
169
179
1. Use the following script to assign a user and role to an application:
## Unassign users, and groups, from an application
195
205
196
206
1. Open an elevated Windows PowerShell command prompt.
197
-
1. Run `Connect-MgGraph -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"` and sign in with a Global Administrator user account. Use the following script to remove a user and role from an application.
207
+
1. Run `Connect-MgGraph -Scopes "Application.ReadWrite.All", "Directory.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"` and sign in as at least a [Cloud Application Administrator](../roles/permissions-reference.md#cloud-application-administrator). Use the following script to remove a user and role from an application.
1. To assign users and groups to an application, sign in to [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer) with one of the roles listed in the prerequisite section.
242
+
1. To assign users and groups to an application, sign in to [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer)as at least a [Cloud Application Administrator](../roles/permissions-reference.md#cloud-application-administrator).
233
243
234
244
You'll need to consent to the following permissions:
0 commit comments