How to disable user sign-ins to applications in Entra ID?
+
Disabling user sign-ins for applications in Entra ID is a crucial step for managing application access and ensuring security. This process allows administrators to control which applications users can access, either temporarily or permanently, based on organizational needs or security policies. By default, user sign-ins for applications are enabled.
- Navigate to the Identity »Applications»Enterprise applications»All applications.
- Select the application you want to disable user sign-ins for. Then, go to the Properties tab.
- Disable the 'Enabled for users to sign-in?' toggle, then click Save.
Run the below PowerShell cmdlet to disable user sign-in for an Azure AD application.
Connect-MgGraph -Scopes "Application.ReadWrite.All"
$servicePrincipal = Get-MgServicePrincipal -Filter "appId eq '<App ID>'"
Update-MgServicePrincipal -ServicePrincipalId $servicePrincipal.Id -AccountEnabled:$false
Replace the <App ID> with the client ID of the target application.
Run the below cmdlet, to list all the enterprise applications where user sign-in is disabled.
Get-MgServicePrincipal -Filter "accountEnabled eq false"