Search result should not show the deleted user in Teams
Once you delete user A and recreate the same user in Teams, search result shows both deleted and recreated user when you try to find (search) user A.
Therefore, you might send a message to the deleted user and it can cause miscommunication with the active user. I strongly request you to improve this behavior immediately. The deleted user should not be searchable in Teams.
we have noticed that users that have been completely and permanently removed from Azure Active directory still appear when searched with the Global Search tool (top of Teams Window) but don't appear when searched via "Add to Chat" search for users.
We added the setting to only search Global Address Book and that seemed to be the fix for the "Add to Chat" searches.
Some people in the organization are NOT experiencing the issues. I believe it may be that these people created their initial Teams account setup after the ghost user accounts were deleted from Azure AD.
It is possible that if these deleted accounts had ever appeared in a search result from BEFORE they were deleted, that you cannot ever return a search without those names included.
John H. commented
My department uses several independent contractors (video producers) who work regularly and closely with our clients. In order to make these contractors appear as part of the organization, we've given them an email address that matches our format: firstname.lastname@example.org However, we do not provide them with a MS Office 365 account.
We have learned these contractors cannot use MS Teams with the email address we've provided them unless they have their own MS Office 365 account. When I say cannot, I mean it isn't possible. Teams won't recognize the email address as valid. For this reason we have several people in the Teams directory with more than one entry. Several people have two entries, one has three entries, and one has four! We need to be able to delete the invalid entries. As it is now, other department members are trying to reach these people using the wrong entry.
This is pretty annoying. Also if an employee is leaving a company and you delete the user. Not all users will recognize it and will still write to the user but the user will just be shwon as "offline". They will think, that the user will receive an E-Mail notification and will answer later.
Also in Channels deleted Users are shown as users who are offline.
Also in "Recent" tab or if you search for the deleted user and you will see the chat with it, the user is just look like it's offline.
Same problem if an employee got married and you would like to update the name. The name won't be updated in the "recent" section in Chats, users will still see the old name there. So you will create a new user for fixing this issue around but in the end you just figure out in the same issue.