Azure AAD - deleted user still appears as administrator

Hi all, I have an user who left the company and his account was removed 1 year ago from AAD but he still appears as a team administrator; do you know a way to clean all these ghost users?

Delete the user from the organization from the organization administration users page.

Remove any access roles first, specially if under PIM

That doesn’t make any sense if the account is deleted from aad.

AzDO tends not to forget users even when they don’t exist in AAD anymore so you an still query for items by their name, plus traceability on code.

Azure DevOps keeps a shadow version of the user for auditing purposes among other reasons.

Work items with their name on it don’t get unassigned
Any potential shelvesets or get branches they own aren’t suddenly orphaned…

And as you’ve found out team admins aren’t removed.

If you add the user back in AAD with the same SID they’ll also get reinstated in Azure DevOps.