Forum Discussion
Teams duplicates contacts until it maxed out at 15000
Hi,
I have a weird issue with some users, Teams seems to be duplicating old Skype for Business contacts until it maxes out at 15000 contacts.
I have been digging into it a bit and found out the location of the folder through Exchange powershell but I can't clear or delete it. Skype for Business is phased out and disabled in my tenant for a long time now so I couldn't do much there, I can't login to it through powershell. We've had Teams since like 2017 so I suspect this is a niche legacy issue popping up recently somehow.
Manual deleting is possible through the browser environment but that is such a hassle because it keeps glitching if you delete per 100 and skipping pages and stuff, need to refresh constantly. Just a pain, it would take days. And no guarentee its not coming back either.
See screenshots.
Does anyone know why this is happening and how to fix this?
Thanks for reading, cheers!
1 Reply
Hi,
This is a known legacy issue related to old Skype for Business contact data stored inside the user’s Exchange Online mailbox. Even though Skype for Business has been fully retired in your tenant, the contact folders created back then still exist in the mailbox and are still referenced by the backend services used by Teams.
Teams does not store contacts independently. It relies on data stored in Exchange Online. Old Skype for Business contacts are typically saved in hidden or special folders inside the mailbox (for example Skype for Business Contacts, Quick Contacts, or similar legacy contact folders). If those folders become corrupted or stuck in a sync loop, Teams may continuously re-import the same entries, resulting in massive duplication until it reaches the technical limit of 15,000 contacts.
That 15,000 limit is a service-side limit for synchronized contacts, which explains why it stops there.
This is why deleting contacts manually in the browser is painful and unreliable. You are deleting items, but the backend sync process may be repopulating them from the corrupted legacy folder. That is also why Exchange PowerShell cannot easily remove the folder — these are hidden or special folders that cannot always be deleted with standard mailbox folder cmdlets.
The correct approach is to remove the legacy Skype for Business contact folders directly from the mailbox using a lower-level method such as EWS (Exchange Web Services) or a tool like MFCMAPI. Deleting the entire legacy contact folder (hard delete) usually resolves the duplication permanently.
Before doing that, you should confirm that affected users are fully in TeamsOnly mode:
Get-CsOnlineUser -Identity email address removed for privacy reasons | Select TeamsUpgradeEffectiveMode
The value should be TeamsOnly. If any coexistence or legacy mode is still applied, the service may continue attempting legacy synchronization.
Once the legacy folders are removed and the user is confirmed as TeamsOnly, force the user to sign out of Teams, clear the local Teams cache, and allow time for resynchronization. In most cases, the duplication does not return after the backend folder corruption is removed.
If this only affects users who previously had large Skype for Business contact lists, that further confirms it is a legacy data issue rather than a current Teams bug.
This is not a common scenario anymore, but it does surface in long-lived tenants that transitioned from Skype for Business to Teams several years ago.