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
Copy file name to clipboardExpand all lines: articles/active-directory/manage-apps/disable-user-sign-in-portal.md
+63-5Lines changed: 63 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,13 @@ ms.service: active-directory
8
8
ms.subservice: app-mgmt
9
9
ms.workload: identity
10
10
ms.topic: how-to
11
-
ms.date: 09/06/2022
11
+
ms.date: 2/23/2023
12
12
ms.author: jomondi
13
13
ms.reviewer: ergreenl
14
14
ms.custom: it-pro
15
15
ms.collection: M365-identity-device-management
16
+
zone_pivot_groups: enterprise-apps-all
17
+
16
18
#customer intent: As an admin, I want to disable user sign-in for an application so that no user can sign in to it in Azure Active Directory.
17
19
---
18
20
# Disable user sign-in for an application
@@ -28,10 +30,12 @@ In this article, you'll learn how to prevent users from signing in to an applica
28
30
To disable user sign-in, you need:
29
31
30
32
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
31
-
- One of the following roles: Global Administrator, Cloud Application Administrator, Application Administrator, or owner of the service principal.
33
+
- One of the following roles: An administrator, or owner of the service principal.
32
34
33
35
## Disable how a user signs in
34
36
37
+
:::zone pivot="portal"
38
+
35
39
1. Sign in to the [Azure portal](https://portal.azure.com) as the global administrator for your directory.
36
40
1. Search for and select **Azure Active Directory**.
37
41
1. Select **Enterprise applications**.
@@ -40,13 +44,18 @@ To disable user sign-in, you need:
40
44
1. Select **No** for **Enabled for users to sign-in?**.
41
45
1. Select **Save**.
42
46
43
-
## Use Azure AD PowerShell to disable an unlisted app
47
+
:::zone-end
44
48
45
-
Ensure you've installed the AzureAD module (use the command Install-Module -Name AzureAD). In case you're prompted to install a NuGet module or the new Azure Active Directory V2 PowerShell module, type Y and press ENTER.
49
+
:::zone pivot="aad-powershell"
46
50
47
-
You may know the AppId of an app that doesn't appear on the Enterprise apps list. For example, you may have deleted the app or the service principal hasn't yet been created due to the app being pre-authorized by Microsoft), you can manually create the service principal for the app and then disable it by using the following cmdlet.
51
+
You may know the AppId of an app that doesn't appear on the Enterprise apps list. For example, you may have deleted the app or the service principal hasn't yet been created due to the app being pre-authorized by Microsoft, you can manually create the service principal for the app and then disable it by using the following Azure AD PowerShell cmdlet.
52
+
53
+
Ensure you've installed the AzureAD module (use the command `Install-Module -Name AzureAD`). In case you're prompted to install a NuGet module or the new Azure AD V2 PowerShell module, type Y and press ENTER.
You may know the AppId of an app that doesn't appear on the Enterprise apps list. For example, you may have deleted the app or the service principal hasn't yet been created due to the app being pre-authorized by Microsoft, you can manually create the service principal for the app and then disable it by using the following Microsoft Graph PowerShell cmdlet.
77
+
78
+
Ensure you've installed the Microsoft Graph module (use the command `Install-Module Microsoft.Graph`).
You may know the AppId of an app that doesn't appear on the Enterprise apps list. For example, you may have deleted the app or the service principal hasn't yet been created due to the app being pre-authorized by Microsoft, you can manually create the service principal for the app and then disable it by using Microsoft Graph explorer.
101
+
102
+
To disable sign-in 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.
103
+
104
+
You'll need to consent to the `Application.ReadWrite.All` permission.
105
+
106
+
Run the following query to disable user sign-in to an application.
0 commit comments