﻿<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <!--
    Forward Sync Settings
    newOrganizationPowerShellSlowResponseTime: a time interval for new-organization remote powershell threshold. This value should be less than 6 minutes which is our Powershell execution limit.
    runspaceCacheSize: an integer representing the maximum capacity of the runspace cache, in number of runspaces.
    runspaceCacheExpirationInterval: a time interval, as hh:mm:ss, at which runspaces expire from the cache.
    maximumConnectionRedirectionCount: an integer representing maximum number of redirects allowed while connecting to Remote PowerShell, default value is 5 which is the same as RemotePowershell. 
    skipCertificateChecks = a bool flag representing whether authentication to open RemotePowershell can skip the certificate certificate authority (CA), common name (CN) and Revocation status check, default is false.
    enableErrorCounter: a boolean flag representing whether to enable cmdlet error counter. Default is false.
    enableSuppressionOfUnsupportedParametersKey: a boolean flag representing whether to enable the suppression of parameters that are not supported. Default is true.
    enableSingleAccountPartitionPerSI: a boolean flag representing whether to enable the restriction of SIs (fsync Service Instances) to particular account partitions 
                                      (so that each call to New-Organization puts the new organization in the account partition specified by the 'AccountPartition' field
                                      of the passed-in Service Instance.)
    errorCounterLogInterval: a time interval to log cmdlet error counter, default value is 10 minutes.
    errorCounterLogNumberLimit: an integer representing the number limit of errors to log cmdlet error counter during the interval(cmdletErrorCounterLogInterval), default value is 600.
    maxRetryCount: an integer representing the maximum number of retries that will be attempted. 
    retrySleepInterval: a time interval, as hh:mm:ss reprenting the time span to sleep before attempting next retry.
    mergeCookiesInterval: a time interval, as hh:mm:ss representing the interval between a tenant full sync completion and when MergeCookies is going to be called. If the actual time 
                          interval exceeds specified TimeSpan value, then a tenant full sync starting from the last finishing point is required to start again to limit the merging 
                          impact to delta sync stream. Default value is 5 mins.
    maxItemsPerPublishCall: an integer representing the maximum number of ServicePublication that will be published to the MSO server in a publish call, default value is 100.
    maxItemsPerGetDirectoryObjectsCall: an integer representing the maximum number of DirectoryObjectIdentity that GetDirectoryObjects will take in a call, default value is 100.
    thresholdTimePerBatch: a time interval representing the expected maximum time spent on process one delta sync batch from MSO, 
                           default is 90 minutes when maxCapacity of persistenceQueue is 50.
    msoSlowResponseTime: a time interval representing the expected maximum reponse time of one MSO request, default is 2 minutes.
    powerShellSlowResponseTime: a time interval representing the expected maximum response time of one powershell command invocation, default is 40 seconds.
    adSlowResponseTime: a time interval representing the expected maximum response time of one AD operation, default is 40 seconds.
    cpuUsagePrecentageWarningThreshold: a float representing the cpu usage warning threshold percentage, default is 10 percent.
    cpuUsagePrecentageErrorThreshold: a float representing the cpu usage error threshold percentage, default is 50 percent.
    memoryUsageMBytesWarningThreshold: a int representing the memory usage warning threshold million bytes, default is 2G.
    memoryUsageMBytesErrorThreshold: a int representing the memory usage error threshold million byptes, default is 4G.
    warningJobProcessorLoopCount: a int representing the job process loop count at which one warning event will be logged, default is 3.
    errorJobProcessorLoopCount: a int representing the job process loop count at which one exception will be throw and job process is teminated, default is 6.
    maxCookieHistoryCount: maximum count of cookies to be kept as part of the history. This should be set for testing purposes only.
    cookieHistoryInterval: time interval between cookies in the history. This should be set for testing purposes only.
    msoServiceInstanceCacheFilePath: MSO service instance map cache file.
    msoServiceInstanceCacheRefreshInterval: MSO service instance map cache refresh interval.
    exceptionHandling: section to configure how exceptions are going to be handled in forward sync. Action can be ignore or abortcookie.    
    haltErrorThreshold: number of errors that service halts when exceeded, default is 100
    temporaryDivergenceLimit: nubmer of allowed temporary divergence in AD, default is 500
    divergenceCountWarningFactor: divergence count warning factor, default is 0.5
    minimumSupportedCASVersion: minimum supported CAS version. default is 14.1.225.0
    minimumSupportedCASCountFraction: minimum fraction of all CASes in allowed version range that are supported by this service required to get the lease, default is 0.75
    collapseBiggestOffendersAtHaltEnabled: flag indicating if biggest offenders at halt should be collapsed to tenant wide divergence, default is false
    minDivergenceCountFactorForTenantWideDivergenceForBiggestOffenderAtHalt: min count of divergence for single tenant that should result in tenant wide divergence for biggest offender at halt, default is 0.2
    maxErrorsOnDivergence: max errors persisted on divergence count, default is 10
    isServicePlanMigrationFeatureEnabled: whether the service plan migration (Upsell) is enabled in Forward Sync
    isMergeInterruptionEnabledKey: whether ForwardSync should interrupt the merge cookies if it takes too long
    enableContactUserCertificateAndUserSMIMECertificate: whether forwardsync should process UserCertificate or UserSMIMECertificate for Contacts
    enableSCTVersionCheckForNewOrganization: Switch to enable/disable checking for appropiate version SCT when selecting RPS server for new-organization calls.
    enableAutoRmsoProvisioning: a boolean flag representing whether to enable RMSO auto provisioning. Default is false.
    enableSyncServiceInfo: a boolean flag representing whether to sync RmsoSubscriptionStatus from ServiceInfo property. Default is false.
    enableReleaseTrack: a boolean flag representing whether to sync EnableReleaseTrack from ServiceInfo property. Default is false.    
    skipUnifiedGroup: whether ForwardSync should ignore unified group object.
    enableUnifiedGroupHandler: Switch to enable/disable unfied group handler.
    syncUnifiedGroupSharePointResources: Switch to enable/disable syncing SharePoint resources of unified group.
    syncTenantRootSharepointUrl: Switch to enable/disable syncing SharePoint root url to organization config.
    wlmThrottlingEnabled: whether WLM throttling is enabled or not
    organizationThrottlingEnabled : whether organiation throttling is enabled or not
    isIgnoredForeignPrincipalMembershipFilterEnabled: Whether ignored foreign principals should also be excluded from role group memberships
    isServiceInstanceFromForestEnabled : whether to get service instance from forest or not
    filterRecipientsDuringReadyForRemoval: filter out updates to recipients while a company is being deleted
    stripGroupSelfMembership: Whether we should strip off group the self membership
    organizationDCAffinity : if DC affinity for the organization creation is handled by FwdSync
    isUseServiceInstanceNameInLogFileNameEnabled : whether to use service instance name as part of log file name or not
    isWriteEventlogToFileEnabled : whether to write event log entries to event log file or not
    syncUnifiedGroupProxyAddresses: Switch to enable/disable syncing the proxyAddresses of a unified group
    isSavingActiveServerHistoryEnabled : whether to save active history or not
    maxActiveServerHistoryEntries : max active server history entries to save
    activeWhenMailboxDatabasePresentEnabled : whether to check mailbox database presence in order for forward sync service to be active or not
    timeIntervalToCheckDatabaseStatus : time interval between database status checks in ms
    completeTransitionOnSuspendOrLockoutKey : Controls whether ForwardSync should complete serviceplan transitions when the old serviceplan is suspended or locked-out.
    objectClassMixupDetectionOn : Controls whether ForwardSync detects object class mix up between EXO and MSO and stops such operations
    softDeleteRoleGroupMembers : Controls if Forwardsync supports soft deleted role group members
    isOpenLeaseFileInReadWriteModeForReadEnabled: whether to open the lease file in read/write mode so that the writers are not blocked
    configOperationRetrySleepIntervalInMilliseconds: config operation retry sleep interval in ms
    leaseFileOperationRetrySleepIntervalInMilliseconds: lease file operation retry sleep interval in ms
    configOperationRetryCount: config operation retry count
    leaseFileOperationRetryCount:  lease file operation retry count
    largeDistributionGroupThreshold: number of member count if exceeded, the system stops processing it and create divergence for the group
    adMinorIssueSlowDown : Amount of time (in secs) that fwdsync slows down if the AD is having a minor replication problem
    adMajorIssueSlowDown :Amount of time (in secs) that fwdsync slows down if the AD is having a major replication problem
Example used for scalability tests: <forwardSync skipCertificateChecks="true" retrySleepInterval="00:00:30">
  -->
  <forwardSync>
    <newOrganizationPowerShellSlowResponseTime value="00:05:00" by="" comment="" />
    <runspaceCacheSize value="50" by="" comment=""/>
    <runspaceCacheExpirationInterval value="02:00:00" by="" comment=""/>
    <maximumConnectionRedirectionCount value="5" by="" comment="" />
    <skipCertificateChecks value= "false" by="" comment=""/>
    <defaultDomainFixKey value= "false" by="" comment=""/>
    <enableCompanyTagsKey value= "true" by="" comment=""/>
    <enablePersistedCapabilitiesKey value= "false" by="" comment=""/>
    <enableDirsyncV1V2RecoveryScenarioKey value= "true" by="swamipat" comment="Enabled by default"/>
    <enableSingleAccountPartitionPerSI value="false" by="cosborn" comment="Disabled by default"/>
    <skipCertificateCNCheck value="true" by="" comment=""/>
    <useLoadBalancer value="true" by="" comment=""/>
    <temporaryDivergenceAbandonInterval value="00:30:00" by="" comment=""/>
    <maxRetryCount value="5" by="" comment=""/>
    <retrySleepInterval value="00:00:10" by="" comment=""/>
    <maxItemsPerPublishCall value="100" by="" comment=""/>
    <maxItemsPerGetDirectoryObjectsCall value="100" by="" comment="" />
    <enableErrorCounter value="false" by="" comment=""/>
    <errorCounterLogNumberLimit value="600" by="" comment=""/>
    <errorCounterLogInterval value="00:10:00" by="" comment=""/>
    <loadBalancerRefreshInterval value="00:05:00" by="" comment=""/>
    <activeCasServerThresholdForAlert value="20" by="" comment=""/>
    <thresholdTimePerBatch value="01:30:00" by="" comment=""/>
    <msoSlowResponseTime value="00:05:00" by="" comment=""/>
    <powerShellSlowResponseTime value="00:00:40" by="" comment=""/>
    <adSlowResponseTime value="00:00:40" by="" comment=""/>
    <cpuUsagePrecentageWarningThreshold value="10.0" by="" comment=""/>
    <cpuUsagePrecentageErrorThreshold value="50.0" by="" comment=""/>
    <memoryUsageMBytesWarningThreshold value="2000" by="" comment=""/>
    <memoryUsageMBytesErrorThreshold value="4000" by="" comment=""/>
    <warningJobProcessorLoopCount value="3" by="" comment=""/>
    <errorJobProcessorLoopCount value="6" by="" comment=""/>
    <mergeCookiesInterval value="00:05:00" by="" comment=""/>
    <maxCookieHistoryCount value="100" by="" comment=""/>
    <cookieHistoryInterval value="00:30:00" by="" comment=""/>
    <msoServiceInstanceCacheFilePath value="%ExchangeInstallPath%Logging\ForwardSyncLogs\Cache\BposServiceInstanceMapCache.xml" by="" comment=""/>
    <msoServiceInstanceCacheRefreshInterval value="00:30:00" by="" comment=""/>
    <haltErrorThreshold value="500" by="" comment=""/>
    <temporaryDivergenceLimit value="2500" by="" comment=""/>
    <divergenceCountWarningFactor value="0.5" by="" comment=""/>
    <minimumSupportedCASVersion value="14.1.225.0" by="" comment=""/>
    <minimumSupportedCASCountFraction value="0.75" by="" comment=""/>
    <disableNonUserMailboxOnLicenseRemoval value="false" by="" comment="" />
    <excludedServerTimeOutOfLoadBalancer value="00:30:00" by="" comment="" />
    <managementAnchorMailboxCapability value="48" by="" comment="" />
    <crossSiteReplicationDelay value="00:15:00" by="" comment="" />
    <inSiteReplicationDelay value="00:05:00" by="" comment="" />
    <inSiteReplicationWait value="00:00:30" by="" comment="" />
    <crossSiteReplicationWait value="00:00:30" by="" comment="" />
    <maxDomainControllerCacheLifeTime value="03:00:00" by="" comment="" />
    <skipDeltaSyncChangesDuringTenantFullSync value ="true" by="" comment="" />
    <enableTenantToServerAffinity value="false" by="" comment="" />
    <allowHardDeletionForEdu2BposMigration value="true" comment=""/>
    <treatRelocationErrorsAsTemporaryDivergence value="true" comment=""/>
    <isLockoutFeatureEnabled value="false" by="" comment="" />
    <disableLicenseEnforcementOnTenantRecovery value="true" by="" comment="" />
    <enableInsightsEnginePush value="false" by="" comment=""/>
    <isTenantContextInitializeLockEnabled value="false" by="" comment=""/>
    <isTenantPartialSyncDefault value="false" by="" comment="" />
    <collapseBiggestOffendersAtHaltEnabled value="false" comment="" />
    <minDivergenceCountFactorForTenantWideDivergenceForBiggestOffenderAtHalt value="0.2" comment="" />
    <maxErrorsOnDivergence value="0" comment="" />
    <isServicePlanMigrationFeatureEnabled value="false" comment="" />
    <isMergeInterruptionEnabled value="true" comment="" />
    <enableContactUserCertificateAndUserSMIMECertificate value="false" by="miknudso" comment="Disabled by default"/>
    <enableSCTVersionCheckForNewOrganization value="true" comment=""/>
    <enableAutoRmsoProvisioning value="false" by="yingxu" comment="Disabled by default"/>
    <enableSyncServiceInfo value="false" by="yingxu" comment="Disabled by default"/>
    <enableReleaseTrack value="true" by="neilko" comment="Enabled by default"/>
    <skipUnifiedGroup value="false" by="gchen" comment="Disabled by default"/>
    <wlmThrottlingEnabled value="true" by="" comment=""/>
    <organizationThrottlingEnabled value="true" by="" comment=""/>
    <enableUnifiedGroupHandler value="false" by="gchen" comment="Disabled by default"/>
    <syncUnifiedGroupSharePointResources value="false" by="gchen" comment="Disabled by default"/>
    <filterRecipientsDuringReadyForRemoval value="false" by="" comment=""/>
    <organizationDCAffinity value = "false" by="" comment=""/>
    <isServiceInstanceFromForestEnabled value="false" by="" comment="Create MSO service instance from the list of local AD lookup"/>
    <isUseServiceInstanceNameInLogFileNameEnabled value="false" by="" comment="Use service instance name as part of log file name"/>
    <isWriteEventlogToFileEnabled value="false" by="" comment="Write event log entries to event log file"/>
    <syncTenantRootSharepointUrl value="false" by="gchen" comment="Disabled by default"/>
    <syncUnifiedGroupProxyAddresses value="false" by="gchen" comment="Disabled by default"/>
    <isSavingActiveServerHistoryEnabled value="false" by="" comment="Save active server history"/>
    <maxActiveServerHistoryEntries value="100" by="" comment="Maximum active server history entry count"/>
    <activeWhenMailboxDatabasePresentEnabled value="false" by="" comment="check mailbox database presence on local server in order for forward sync to be active"/>
    <timeIntervalToCheckDatabaseStatus value="1800000" by="" comment="time interval (ms) between database status checks"/>
    <completeTransitionOnSuspendOrLockoutKey value = "true" by="" comment=""/>
    <objectClassMixupDetectionOn value = "true" by="" comment=""/>
    <softDeleteRoleGroupMembers value = "false" by="" comment=""/>
    <isOpenLeaseFileInReadWriteModeForReadEnabled value = "false" by="" comment="open the lease file in read/write mode so that the writers are not blocked"/>
    <ADConfigurationOperationRetrySleepIntervalInMilliseconds value="100" by="" comment="AD config operation retry sleep interval in ms"/>
    <leaseFileOperationRetrySleepIntervalInMilliseconds value="100" by="" comment="lease file operation retry sleep interval in ms="/>
    <ADConfigurationOperationRetryCount value="10" by="" comment="AD config operation retry count"/>
    <leaseFileOperationRetryCount value="10" by="" comment=" lease file operation retry count="/>
    <largeDistributionGroupThreshold value = "10000" by="" comment="number of member count if exceeded, the system stops processing it and create divergence for the group"/>
    <adMinorIssueSlowDown value ="2" by="" comment=""/>
    <adMajorIssueSlowDown value ="10" by="" comment=""/>

    <!--
      Section to control what kind of error we can publish back to MSO.
      publishableExchangeErrorCategories: a string with the entries of Microsoft.Exchange.Data.ExchangeErrorCategory, delimited by comma, indicating which errors can be published to MSO.
      publishablePowerShellErrorCategories: a string with the entries of System.Management.Automation.ErrorCategory, delimited by comma, indicating which errors can be published to MSO.
      publishableCmdletExceptionTypes: a string with exception types, delimited by comma, indicating which errors can be published to MSO. The default value includes:
                                       Microsoft.Exchange.Configuration.ObjectModel.ProvisioningValidationException
      publishableCmdletExceptionStringIds: a string with StringIds of LocalizedString, delimited by comma, indicating which errors can be published to MSO.
    -->
    <publishableError>
      <publishableExchangeErrorCategories value="WindowsLiveIdAlreadyUsed"  by="" comment=""/>
      <publishablePowerShellErrorCategories value="InvalidArgument, InvalidData, SyntaxError, InvalidType, ResourceExists"  by="" comment=""/>
      <publishableCmdletExceptionStringIds value="" by="" comment=""/>
      <nonPublishableCmdletExceptionStringIds value="Ex6F9304,Ex9E65A2,Ex8155FB,Ex2B633F,Ex24E7C5" by="" comment="" />
    </publishableError>
      
    <!--
      enabled: a boolean that indicate whether enable or disable Audit Log, this is required and default is false.
      directory: a string that indicate the directory location of Audit Log. This is mandatory parameter.
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Audit Log. 0 means no age quota. default is 30 days.
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Audit Log. default is 100 MB. 
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Audit Log. default is 30GB. 
      changeTypeFilter: a string with entries of ChangeType delimited by comma, representing the change type filter in Audit Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: enum of ChangeType (New, Update, Remove, Convert). default is empty.
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Audit Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty
      operationCodeFailedOnly: a boolean that indicate whether log failed operation code only, it means not log the success one. default is false. 
      allowedParameters: a string with entries of allowed parameters delimited by comma, representing the the allowed parameters in Audit Log. Logs only parameters belong to the allowed parameters. default is "*".
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds. 
    -->
    <auditLog>
      <enabled value="true" by="" comment="" />
      <operationCodeFailedOnly value="false" by="" comment="" />
      <directory value="%ExchangeInstallDir%Logging\ForwardSyncLogs\AuditLog\" by="" comment=""/>
      <changeTypeFilter value="" by="" comment=""/>
      <tenantIdFilter value="" by="" comment="" />
      <allowedParameters value="*" by="" comment="" />
      <fileAgeQuota value="30" by="" comment="" />
      <fileSizeQuota value="100" by="" comment="" />
      <directorySizeQuota value="30720" by="" comment=""/>
      <logFlushInterval value="60" by="" comment="" />
      <logCacheSize value="2" by="" comment="" />
    </auditLog>

    <!--
      enabled: a boolean that indicate whether enable or disable Publish Log. this is required and default is false.
      directory: a string that indicate the directory location of Publish Log. This is mandatory. 
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Publish Log. default is 100 MB. 
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Publish Log. 0 means no age quota. default is 30 days.
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Publish Log. default is 30GB.
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Publish Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty.
      updateResultCodeFailedOnly: a boolean that indicate whether log failed update result code only, it means not log the success one. default is false.
      errorDetailEnabled: a boolean that indicate whether log the XML of error detail in Publish Log. default is true. 
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds. 
    -->
    <publishLog>
      <enabled value="true" by="" comment="" />
      <directory value="%ExchangeInstallDir%Logging\ForwardSyncLogs\PublishLog\" by="" comment="" />
      <fileAgeQuota value="30" by="" comment="" />
      <fileSizeQuota value="100" by="" comment="" />
      <directorySizeQuota value="30720" by="" comment="" />
      <logFlushInterval value="60" by="" comment="" />
      <logCacheSize value="2" by="" comment="" />
      <tenantIdFilter value="" by="" comment="" />
      <updateResultCodeFailedOnly value="false" by="" comment="" />
      <errorDetailEnabled value="true" by="" comment="" />
    </publishLog>

    <!--
      enabled: a boolean that indicate whether enable or disable Receive Log. this is require and default is false. 
      directory: a string that indicate the directory location of Receive Log. This is mandatory. 
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for Receive Log. 0 means no age quota. default is 30 days. 
      fileSizeQuota: an integer, representing the file size quota in mega bytes for Receive Log. default is 100MB. 
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for Receive Log. default is 30GB. 
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in Receive Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty. 
      directoryTypeFilter: a string with entries of DirectoryType delimited by comma, representing the DirectoryType filter in Receive Log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: enum of DirectoryType. default is empty. 
      logCacheSize: maximum log cache size in mega bytes. Default is 2 mega bytes.        
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds.       
    -->
    <receiveLog>
      <enabled value="true" by="" comment="" />
      <directory value="%ExchangeInstallDir%Logging\ForwardSyncLogs\ReceiveLog\" by="" comment="" />
      <fileAgeQuota value="30" by="" comment="" />
      <fileSizeQuota value="100" by="" comment="" />
      <directorySizeQuota value="30720" by="" comment="" />
      <logFlushInterval value="60" by="" comment="" />
      <logCacheSize value="2" by="" comment="" />
      <directoryTypeFilter value="" by="" comment="" />
      <tenantIdFilter value="" by="" comment="" />
    </receiveLog>

    <!--
      enabled: a boolean that indicate whether enable or disable event log. this is require and default is false. 
      directory: a string that indicate the directory location of event log. This is mandatory. 
      fileAgeQuota: a time interval, as d.hh:mm:ss representing the length of time to keep log files for event Log. 0 means no age quota. default is 30 days. 
      fileSizeQuota: an integer, representing the file size quota in mega bytes for event log. default is 100MB. 
      directorySizeQuota: an integer, representing the directory size quota in mega bytes for event log. default is 30GB. 
      tenantIdFilter: a string with entries of tenant Id delimited by comma, representing the tenant filter in event log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: tenant Id. default is empty. 
      directoryTypeFilter: a string with entries of DirectoryType delimited by comma, representing the DirectoryType filter in event log. Logs all data if the filter is empty. Otherwise, log the data only meet the filter condiction. Allowed filter values: enum of DirectoryType. default is empty. 
      logCacheSize: maximum log cache size in mega bytes. Default is 2 mega bytes.        
      logFlushInterval: a time interval in seconds to control how often we flush the log. Default is 60 seconds.       
    -->
    <eventLog>
      <enabled value="true" by="" comment="" />
      <directory value="%ExchangeInstallDir%Logging\ForwardSyncLogs\EventLog\" by="" comment="" />
      <fileAgeQuota value="30" by="" comment="" />
      <fileSizeQuota value="100" by="" comment="" />
      <directorySizeQuota value="30720" by="" comment="" />
      <logFlushInterval value="60" by="" comment="" />
      <logCacheSize value="2" by="" comment="" />
      <directoryTypeFilter value="" by="" comment="" />
      <tenantIdFilter value="" by="" comment="" />
    </eventLog>
    
    <!-- restrictedAssemblies>
      <add>
        <name value="Microsoft.Exchange.Data.Directory.dll" />
        <allowedVersions value="15.0.680.19-15.0.680.19;15.0.692.0-15.0.700.0" />
      </add>
      <add>
        <name value="Microsoft.Exchange.Management.dll" />
        <allowedVersions value="15.0.692.0-15.1.0.0" />
      </add>
    </restrictedAssemblies -->

    <exceptionHandling>
      <!--
      You can add exceptions in the following list to control forward sync behavior. Allowed action include Ignore and Retry now.
      Ignore means this exception will be caught and ignored. Retry means this exception will cause us to retry provisioning 
      by aborting cookie advancement or just retry the changes for this tenant.
      1. Use version 15.0.0.0 for any assemblies in the Exchange bin folder.
      2. a. Use GAC_Assemblyversion as the version for any GAC'd assemblies. It'll be replaced with correct version during build time.
         b. In prodution you need to specify the correct version yourself.
      -->
      
      <add>
        <type value="System.IO.FileLoadException" by="" comment="" />
        <action value="Retry" by=""  comment="" />
      </add>
      
      <add>
        <type value="System.Threading.ThreadInterruptedException" by="" comment="" />
        <action value="Retry" by=""  comment="" />
      </add>
      
      <add>
        <type value="System.TimeoutException" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="Microsoft.Exchange.Management.ForwardSync.PublicationFailedException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="Microsoft.Exchange.Management.ForwardSync.JobProcessorDeepLoopException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="System.Management.Automation.RemoteException, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="System.Management.Automation.RuntimeException, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="System.Management.Automation.Runspaces.InvalidRunspaceStateException, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="System.ServiceModel.CommunicationException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="Microsoft.Exchange.Data.Common.TransientException, Microsoft.Exchange.Data.Common, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="Microsoft.Exchange.Management.ForwardSync.WorkflowException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="Microsoft.Exchange.Management.ForwardSync.TenantContextNotFoundException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>

      <add>
        <type value="Microsoft.Exchange.Management.ForwardSync.TenantContextNotWritableException, Microsoft.Exchange.Management.ForwardSync, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" by="" comment="" />
        <action value="Retry" by="" comment="" />
      </add>
    </exceptionHandling>

    <!-- Configuration of the various sync streams and their related queues. -->
    <syncContext>

      <publishingQueue>
        <maxCapacity value="2000" by="" comment=""/>
        <workerThreads value="5" by="" comment="" />
        <pollingInterval value="00:00:00" by="" comment=""/>
        <processItemRetry>
          <delayBetweenRetries value="00:00:05" by="" comment=""/>
          <delayMultiplier value="1" by="" comment=""/>
          <maxAttempts value="30" by="" comment=""/>
          <timeToLive value="1.00:00:00" by="" comment=""/>
        </processItemRetry>
      </publishingQueue>

      <companyQueues>
        <tenantChangesQueue>
          <maxCapacity value="2000" by="" comment="" />
          <workerThreads value="12" by="" comment=""/>
          <pollingInterval value="00:00:00" by="" comment=""/>
          <processItemRetry>
            <delayBetweenRetries value="00:00:05" by="" comment=""/>
            <delayMultiplier value="1" by="" comment=""/>
            <maxAttempts value="3" by="" comment=""/>
            <timeToLive value="1.00:00:00" by="" comment=""/>
          </processItemRetry>
        </tenantChangesQueue>

        <workflowQueue>
          <maxCapacity value="2000" by="" comment="" />
          <workerThreads value="12" by="" comment=""/>
          <pollingInterval value="00:00:00" by="" comment=""/>
          <processItemRetry>
            <delayBetweenRetries value="00:00:05" by="" comment=""/>
            <delayMultiplier value="1" by="" comment=""/>
            <maxAttempts value="3" by="" comment=""/>
            <timeToLive value="00:10:00" by="" comment=""/>
          </processItemRetry>
        </workflowQueue>

        <fullSyncControllerQueue>
          <maxCapacity value="500" by="" comment="" />
          <workerThreads value="20" by="" comment=""/>
          <pollingInterval value="00:00:00" by="" comment=""/>
          <processItemRetry>
            <delayBetweenRetries value="00:00:10" by="" comment=""/>
            <delayMultiplier value="1" by="" comment=""/>
            <maxAttempts value="1" by="" comment=""/>
            <timeToLive value="01:00:00" by="" comment=""/>
          </processItemRetry>

        </fullSyncControllerQueue>
        <fullSyncPollingWorker>
          <pollingInterval value="00:01:00" by="" comment=""/>
        </fullSyncPollingWorker>
      </companyQueues>


      <recipientQueues>
        <tenantChangesQueue>
          <maxCapacity value="2000" by="" comment="" />
          <workerThreads value="24" by="" comment=""/>
          <pollingInterval value="00:00:00" by="" comment=""/>
          <processItemRetry>
            <delayBetweenRetries value="00:00:05" by="" comment=""/>
            <delayMultiplier value="1" by="" comment=""/>
            <maxAttempts value="3" by="" comment=""/>
            <timeToLive value="1.0:00:00" by="" comment=""/>
          </processItemRetry>
          <throttler>
            <maxMinutesToTrack value="20" by="" comment=""/>
            <sweepDepthInMinutes value="10" by="" comment=""/>
            <minutesBetweenSweeps value="11" by="" comment=""/>
            <objectThreshold value="400" by="" comment=""/>
            <linkThreshold value="1500" by="" comment=""/>
            <percentageOfStreamThreshold value="38" by="" comment=""/>
            <requireTenantInBackLogToTFS value="false" by="" comment=""/>
          </throttler>
        </tenantChangesQueue>

        <workflowQueue>
          <maxCapacity value="2000" by="" comment="" />
          <workerThreads value="24" by="" comment=""/>
          <threadsPreferingFullSyncChanges value="5" by="" comment="" />
          <pollingInterval value="00:00:00" by="" comment=""/>
          <processItemRetry>
            <delayBetweenRetries value="00:00:05" by="" comment=""/>
            <delayMultiplier value="1" by="" comment=""/>
            <maxAttempts value="3" by="" comment=""/>
            <timeToLive value="00:10:00" by="" comment=""/>
          </processItemRetry>
        </workflowQueue>

        <fullSyncControllerQueue>
          <maxCapacity value="500" by="" comment="" />
          <workerThreads value="20"  by="" comment=""/>
          <pollingInterval value="00:00:00" by="" comment=""/>
          <processItemRetry>
            <delayBetweenRetries value="00:00:10" by="" comment=""/>
            <delayMultiplier value="1" by="" comment=""/>
            <maxAttempts value="1" by="" comment=""/>
            <timeToLive value="01:00:00" by="" comment=""/>
          </processItemRetry>
        </fullSyncControllerQueue>

        <fullSyncPollingWorker>
          <pollingInterval value="00:01:00" by="" comment=""/>
        </fullSyncPollingWorker>
      </recipientQueues>


      <deltaSync>
        <companyStream>
          <pollingInterval value="00:00:05" by="" comment=""/>
          <persistenceQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="1" by="" comment=""/>
              <maxAttempts value="0" by="" comment=""/>
              <timeToLive value="00:00:00" by="" comment=""/>
            </processItemRetry>
          </persistenceQueue>

          <provisioningQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="2" by="" comment=""/>
              <maxAttempts value="4" by="" comment=""/>
              <timeToLive value="1.00:00:00" by="" comment=""/>
            </processItemRetry>
          </provisioningQueue>
        </companyStream>

        <recipientStream>
          <pollingInterval value="00:00:05" by="" comment=""/>
          <persistenceQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="1" by="" comment=""/>
              <maxAttempts value="0" by="" comment=""/>
              <timeToLive value="00:00:00" by="" comment=""/>
            </processItemRetry>
          </persistenceQueue>

          <provisioningQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="2" by="" comment=""/>
              <maxAttempts value="4" by="" comment=""/>
              <timeToLive value="1.00:00:00" by="" comment=""/>
            </processItemRetry>
          </provisioningQueue>
        </recipientStream>
      </deltaSync>

      <fullSync>
        <companyStream>
          <pollingInterval value="00:00:20" by="" comment=""/>
          <persistenceQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="1" by="" comment=""/>
              <maxAttempts value="0" by="" comment=""/>
              <timeToLive value="00:00:00" by="" comment=""/>
            </processItemRetry>
          </persistenceQueue>

          <provisioningQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="2" by="" comment=""/>
              <maxAttempts value="4" by="" comment=""/>
              <timeToLive value="1.00:00:00" by="" comment=""/>
            </processItemRetry>
          </provisioningQueue>
        </companyStream>

        <recipientStream>
          <pollingInterval value="00:00:20" by="" comment=""/>
          <persistenceQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="1" by="" comment=""/>
              <maxAttempts value="0" by="" comment=""/>
              <timeToLive value="00:00:00" by="" comment=""/>
            </processItemRetry>
          </persistenceQueue>

          <provisioningQueue>
            <maxCapacity value="50" by="" comment="" />
            <pollingInterval value="00:00:20" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="2" by="" comment=""/>
              <maxAttempts value="4" by="" comment=""/>
              <timeToLive value="1.00:00:00" by="" comment=""/>
            </processItemRetry>
          </provisioningQueue>
        </recipientStream>
      </fullSync>

      <objectFullSync>
        <companyStream>
          <pollingInterval value="00:00:20" by="" comment=""/>
          <persistenceQueue>
            <maxCapacity value="5" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="1" by="" comment=""/>
              <maxAttempts value="0" by="" comment=""/>
              <timeToLive value="00:00:00" by="" comment=""/>
            </processItemRetry>
          </persistenceQueue>

          <provisioningQueue>
            <maxCapacity value="5" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="2" by="" comment=""/>
              <maxAttempts value="4" by="" comment=""/>
              <timeToLive value="1.00:00:00" by="" comment=""/>
            </processItemRetry>
          </provisioningQueue>
        </companyStream>

        <recipientStream>
          <pollingInterval value="00:00:10" by="" comment=""/>
          <persistenceQueue>
            <maxCapacity value="5" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="1" by="" comment=""/>
              <maxAttempts value="0" by="" comment=""/>
              <timeToLive value="00:00:00" by="" comment=""/>
            </processItemRetry>
          </persistenceQueue>

          <provisioningQueue>
            <maxCapacity value="5" by="" comment="" />
            <pollingInterval value="00:00:00" by="" comment=""/>
            <processItemRetry>
              <delayBetweenRetries value="00:00:10" by="" comment=""/>
              <delayMultiplier value="2" by="" comment=""/>
              <maxAttempts value="4" by="" comment=""/>
              <timeToLive value="1.00:00:00" by="" comment=""/>
            </processItemRetry>
          </provisioningQueue>
        </recipientStream>
      </objectFullSync>

      <RecipientDrainingWorker>
        <pollingInterval value="00:01:00" by="" comment=""/>
      </RecipientDrainingWorker>
    </syncContext>
  </forwardSync>
  </configuration>

