diff --git a/src/Fusion.Summary.Functions/Functions/DepartmentResourceOwnerSync.cs b/src/Fusion.Summary.Functions/Functions/DepartmentResourceOwnerSync.cs index 124649c92..d00d3445c 100644 --- a/src/Fusion.Summary.Functions/Functions/DepartmentResourceOwnerSync.cs +++ b/src/Fusion.Summary.Functions/Functions/DepartmentResourceOwnerSync.cs @@ -78,7 +78,8 @@ public async Task RunAsync( // Fetch all departments var departments = (await lineOrgApiClient.GetOrgUnitDepartmentsAsync()) .DistinctBy(d => d.SapId) - .Where(d => d.FullDepartment != null && d.SapId != null); + .Where(d => d.FullDepartment != null && d.SapId != null) + .Where(d => d.Level >= 4); if (_departmentFilter.Length != 0) departments = departments.Where(d => _departmentFilter.Any(df => d.FullDepartment!.Contains(df)));