The process of building custom solutions for SharePoint Server.
Hi @Baojun Guo
Thank you for posting question to Microsoft Q&A.
This is expected behavior. When a user or guest first visits a SharePoint site, an entry is created in the site’s hidden User Information List. Deleting the account in Azure AD does not automatically remove this entry, so the name may still show in Manage Access. The user no longer has access because authentication fails, but the cached record remains.
I'd suggest you check on this article: https://learn.microsoft.com/en-us/sharepoint/remove-users#remove-people-from-the-userinfo-list
You could use PowerShell to try to remove that "orphaned users" to see if that works - also browse to the site and edit the URL by adding the following string to the end of it: /_layouts/15/people.aspx?MembershipGroupId=0 and look for the user as well.
Currently, Microsoft does not have any actual process to automatically clean up deleted Azure AD users from SharePoint. I also tried to look into this:
https://feedbackportal.microsoft.com/feedback/search/06735c62-321c-ec11-b6e7-0022481f8472?q=Deleted+user+in+SharePoint and saw a lot of feedbacks from there, you could leave a feedback in here as well so Microsoft could consider this in the future.
As I am forum moderator, I do not have access to Microsoft Internal System to check on this - but your feedback will be appreciated and considered in the future. I truly hope that this information is helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.