Groups sync configuration

Summary

This page contains information about configuring groups synchronization in Teamwork. In current architecture groups data is synchronized first from Azure AD via Graph to Azure table by ValoTeamworkSyncGroup web job. After that these groups are displayed in TW dashboard.

Change frequency of PopulateGroups Azure function

By default, web job runs every 15 minutes but it is possible to change frequency via settings.job file or by recreating web job from Azure Portal.

AF will run until all groups will be synchronized to Azure table. If it requires more than current frequency interval then new instance won't start until previous instance will be completed.

Groups sync configuration

Sync may take time to complete because it synchronizes data for all groups in customer’s tenant. In order to complete sync faster it synchronizes groups in multiple threads. In order to do that it splits total number of groups by chunks where each chunk is processed in own thread. By default it calculates chunk size so all groups will be processed in 4 threads (i.e. divides total groups count on 4). It is also possible to set thread chunk size using the following app setting:

  • TeamworkGroupSyncThreadChunkSize

If it is set system will use this chunk size instead of default. However it is not possible to set it to value less than minimum available size which is 300 groups – in this case function will use minimal chunk size (300 groups per chunk). The less chunk size is – the more threads will be created. Web job will wait for all threads to be completed.

During sync web job makes many calls to Graph/CSOM which may cause throttling issues. In order to avoid throttling problem it is possible to configure delay between Graph/CSOM calls. This delay may be configured via the following app setting:

  • TeamworkGroupSyncDelayMsec

By default, it is set to 300 milliseconds.

  • TeamworkGroupSyncMaxGroupsToSync

Set limit how many groups will be synchronized from Graph to Azure storage table during one run of Group sync web job. By default it is not limited, but if there are many groups, sync may fail with timeout errors after few hours of work. Limiting number of groups to synced on one run will help to avoid this error.