Hi,
Hopefully right forum for this topic related to the D365CE and Teams Integration.
Question: Is it "supported" to update/remove items in the msdyn_teamscollaborations, sharepointdocumentlocations and sharepointsites tables?
Background
We have enabled the Microsoft Teams integration in our D365CE implementation and using it heavily. I have noticed though that when a team is renamed it is not reflected in D365. The same apply when a team is deleted and not disconnected priorly then the team is still present in the msdyn_teamscollaborations table that keeps track of connected teams, this results in orphaned items in the table(s). When asking Microsoft if they plan to have a synchronization job to keep the related teams tables updated and clean then the answer has been that there are no plans from the product team on such thing.
Issue
In our case as we are using the teams integration heavily, we see that the msdyn_teamscollaborations, sharepointdocumentlocations and sharepointsites tables becomes quite large 40 000 - 100 000 rows of JSON which from a performance point of view is not optimal. Over time this will obviously grow.
Solution and question
So, to mitigate this I have built a job using Azure and Power Automate that removes orphaned items from the msdyn_teamscollaborations, sharepointdocumentlocations and sharepointsites tables but before enabling such solution in a production environment I wonder if it is "supported" or are actions on the mentioned tables not allowed?
On a side note, when experiencing issues with the teams connector that couldn't list a connected team in D365 then when in touch with MS Support the solution was to update a value in the sharepointdocumentlocations and sharepointsites tables. With this in mind I thought it is OK to update values in these tables but unsure.
The screenshot shows relation between a Teams team object and the tables in D365 when a team is connected. With this we can then find orphaned items (teams that have been deleted) or update renamed teams.
(To get table data: .../api/data/v9.2/sharepointdocumentlocations)