Groups sync configuration
Summary¶
This page contains general information about the configuration for the synchronization of group-based workspaces in Valo Teamwork. The current architecture synchronizes data related to group-based workspaces (Microsoft Teams teams, Microsoft 365 groups, and Yammer connected groups) from Azure Active Directory (Azure AD) via Microsoft Graph to an Microsoft Azure Cosmos DB. This asynchronous process runs by the ValoTeamworkSyncGroup web job. Valo Teamwork uses this Azure Cosmos DB as a datasource in different product areas, such as Valo Teamwork Dashboard and Groups tab in the Valo Teamwork admin site collection.
Change frequency of PopulateGroups Azure function¶
By default, the timer triggered web job (ValoTeamworkSyncGroup
), which triggeres the process to populate the Azure Cosmos DB, runs every 15 minutes. However, you can change this frequency via the settings.job file or by recreating the web job from the Microsoft Azure Portal.
Each instance of the timer triggered web job runs until all groups have been synchronized to the Azure Cosmos DB. If a running instance requires more time than the current frequency interval, a new instance won't start until the previous one has completed.
Groups sync configuration¶
A sync operation might take time to complete because it synchronizes data for all group-based workspaces in the tenant of a customer. To speed up the process, the timer triggered web job uses multi-threading and other components from the Azure infrastructure. In detail, the ValoTeamworkSyncGroup web job adds sync messages to an Azure storage queue, containing basic information about the groups. Additionally, it synchronizes new groups (those added to the Azure AD since last run) first, followed by existing groups (those already available in the Azure Cosmos DB). In a second step, a queue-triggered web job processes these messages and synchronizes the group-related information to the Valo Teamwork Azure Cosmos DB. For completeness, the web job also ensures that groups deleted from the Azure AD since the last sync will also be deleted from the Azure Cosmos DB during the current sync operation.
During a sync operation, the web job performs many calls to Microsoft Graph/CSOM which might cause throttling issues. To avoid throttling, use the following app setting in the Valo Teamwork Azure Function to increase the delay between each Microsoft Graph/CSOM call:
- TeamworkGroupSyncDelayMsec: By default, it is set to 300 milliseconds.
- TeamworkGroupSyncMaxGroupsToSync: Set the limit of how many group-based workspaces will be synchronized from Azure AD to Azure Cosmos DB during one run of the ValoTeamworkSyncGroup web job. By default, this value isn't set, which can cause the sync of a large amount of groups to fail with timeout errors that usually appears after the web job ran for a few hours. In this case, consider limiting the amount of groups to be synchronized within one sync operation.
Groups sync after update¶
Valo Teamwork 5.0 introduces Microsoft Cosmos DB as a new storage for all groups/teams-related data. This new approach replaces the Groups table in Azure Storage. For more details about the reasons to switch to Cosmos DB, see Valo Teamwork replaces Azure Table with Azure Cosmos DB to manage groups at scale.
Initially, the Cosmos DB database will be empty. The population of this database will be triggered during the Valo Teamwork installation as a background operation that might take a few hours depending on the amount of groups and teams in your tenant. Only after the background-running full sync operation is complete, all groups/teams will be displayed in Teamwork dashboard.
For an estimation on the duration of the sync operation, we recommend the following formula: amount of groups x 1 sec + 15 minutes