Disabled user accounts should hold no Azure role assignments
This check looks for user accounts that are disabled in Microsoft Entra ID but still hold Azure role assignments such as Reader, Contributor or Owner. The safe setting is that disabled accounts have none, so old access cannot be revived.
Why it matters
A disabled account cannot sign in, but its role assignments stay in place. If the account is later switched back on, by mistake or by someone who has gained admin rights, it immediately has all the access it had before. Leftover assignments also clutter access reviews and make it harder to see who really has rights over a subscription.
Azure role-based access control keeps the assignment against the user's object until someone removes it, so cleaning up is a separate step from disabling the account.
Source: Microsoft Learn, List Azure role assignments using Azure CLI.
How to check it yourself
Portal: Microsoft Entra admin center > Users, filter on accounts that are not enabled and note their names; then, in the Azure portal, open the subscription or resource group > Access control (IAM) > Role assignments and look for those names. Read-only commands:
az ad user list --query "[?accountEnabled==false].{upn:userPrincipalName,id:id}" --output table
az role assignment list --all --assignee --output table Any row returned for a disabled user is a finding.
How to fix it
Portal: in Access control (IAM) > Role assignments, tick the entries for the disabled user and choose Remove. Repeat for each scope. Script (run by an admin, not by ConfigCobra):
az role assignment delete --assignee --all Check the list output first so you know exactly what will be removed. ConfigCobra itself never changes your Azure environment; it reports the finding and suggests these steps. Make removal part of the offboarding checklist so it happens when the account is disabled.
What changes when you fix it
For a truly departed person nothing visible changes, since the account cannot sign in anyway. The point to watch is accounts disabled temporarily, such as someone on long leave or a shared or service-style user: when they return, access has to be granted again. Also check that no automation still runs under the disabled user's identity, because removing its assignments would make that job fail. Subscription owners and the identity team are the groups to notify.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Microsoft Azure Foundations v6.0.0 | 5.3.5 | Level 1 |
More checks in Identity Services
Check this on your Microsoft Azure
ConfigCobra runs this check with every other control of the CIS Microsoft Azure Benchmarks, read-only.