Remediation
From Azure Portal
- In the Azure portal, open the portal menu.
- Select
Microsoft Entra ID. - Under
Manage, selectUsers. - Click on
Add filter. - Select
User type. - Select
Guestfrom the Value dropdown. - Click
Apply. - Check the box next to all
Guestusers that are no longer required or are inactive. - Click
Delete. - Click
OK.
From Azure CLI
Before deleting the user, set it to inactive using the ID from the Audit Procedure to determine if there are any dependent systems:
az ad user update --id {{exampleaccountid@domain.com}} --account-enabled {false}
After determining that there are no dependent systems, delete the user:
Remove-AzureADUser -ObjectId {{exampleaccountid@domain.com}}
From Azure PowerShell
Before deleting the user, set it to inactive using the ID from the Audit Procedure to determine if there are any dependent systems:
Set-AzureADUser -ObjectId "{{exampleaccountid@domain.com}}" -AccountEnabled false
After determining that there are no dependent systems, delete the user:
Remove-AzureADUser -ObjectId {{exampleaccountid@domain.com}}