Skip to main content

Organization Troubleshooting

Summary

Use authorized, read-only organization views, employee results, audit/timeline entries, and public-safe event status to identify the owning boundary. Never use direct database edits or include personal, credential, or configuration data in diagnostics.

Audience

  • Tenant administrators and implementation partners
  • Support, development, QA, and DevOps teams

Purpose

This page provides non-destructive checks for scenarios represented in current source.

Architecture

Symptoms

ScenarioSymptom
Department not availableAn active department is absent from selection or lookup.
Designation not availableAn expected designation is absent or rejected.
Employee cannot be assignedEmployee creation or reassignment returns validation failure.
Manager assignment rejectedA manager change is not accepted.
Organization hierarchy not updatedThe chart still shows an earlier reporting relationship.
Previous department remains visibleAn employee appears under the old department after reassignment.
Tenant mismatchRecords cannot be resolved in the active tenant context.
Duplicate department/designationCreation or update reports a code/name conflict.
Missing organization contextThe service reports missing tenant context or returns no tenant-scoped data.
Downstream module is staleAttendance, Leave, Payroll, Performance, Workflow, or Reporting does not reflect the change.

Cause

ScenarioLikely source-supported cause
Department not availableIt is inactive, belongs to another tenant scope, or the active route reads a different transitional store.
Designation not availableIt is inactive, tenant-invisible, department-filtered, or stored in the other compatibility boundary.
Employee cannot be assignedThe referenced master is inactive/missing, designation and department conflict during creation, or tenant context is absent.
Manager assignment rejectedThe manager is inactive/missing, is the employee, or is outside the tenant-visible data scope.
Organization hierarchy not updatedThe UI chart reads the transitional user-manager hierarchy rather than Employee Service reporting-manager data.
Previous department remains visibleA cached/read-model view is stale, or the request changed a different compatibility store.
Tenant mismatchTenant claims/context do not identify the record’s owner.
Duplicate department/designationA normalized code already exists in the tenant; monolith compatibility may also reject duplicate names.
Missing organization contextThe authenticated request lacks usable tenant identity.
Downstream module is staleNo confirmed consumer handles the organization-change event, or the module reads monolith/shared data during transition.

Resolution

ScenarioSafe resolution
Department not availableConfirm active state, tenant ownership, and approved route owner through authorized views.
Designation not availableConfirm active state and any department association; select a compatible designation or request governed master-data correction.
Employee cannot be assignedCorrect the referenced active master and tenant context, then retry through the supported application path.
Manager assignment rejectedSelect another active employee in the same tenant and avoid self-reference. Escalate suspected cycles for review.
Organization hierarchy not updatedCompare Employee Service reporting data with the transitional user hierarchy and route the discrepancy to the owning team.
Previous department remains visibleRefresh the supported view and compare the authoritative employee result, audit/timeline, and active route owner.
Tenant mismatchReauthenticate in the intended tenant and verify only non-sensitive tenant identifiers through approved tools.
Duplicate department/designationReuse/update the existing master when appropriate or choose an approved unique code.
Missing organization contextRe-establish the correct authenticated tenant session; do not inject internal headers or bypass authorization.
Downstream module is staleConfirm whether a consumer exists and whether the module reads events or a transitional store; escalate rather than editing data directly.

Validation

  • Confirm the current tenant context without recording claims or tokens.
  • Confirm the department/designation exists, is active, and is visible in the intended boundary.
  • Confirm the employee’s current department, designation, and manager from the authoritative employee view.
  • Confirm the audit/timeline entry and public-safe outbox processing status where applicable.
  • Confirm Gateway cutover ownership through approved operational documentation.
  • Confirm the downstream service has a verified consumer or documented read path before expecting synchronization.

Escalation

Provide a sanitized correlation reference, UTC time range, affected non-sensitive record reference, active application boundary, expected versus observed state, and checks completed. Route company-profile issues to Platform, organization masters/assignments to Employee Service, access issues to Identity/security, and stale downstream state to the consuming service owner.

Technical implementation

Current source provides tenant filters, active-reference validation, unique-code checks, assignment commands, compatibility routing, audit/timeline records, and outbox events that support these diagnostics.

Source References

  • microservices/src/employee-service/Application/Organization/Organization.cs
  • microservices/src/employee-service/Application/Validators/EmployeeCommandValidators.cs
  • microservices/src/employee-service/Application/Commands/EmployeeApplicationCommands.cs
  • microservices/src/employee-service/Application/Queries/EmployeeApplicationQueries.cs
  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
  • microservices/src/employee-service/Api/EmployeeCompatibilityEndpoints.cs
  • microservices/src/gateway-api/Program.cs
  • Controllers/DepartmentsController.cs
  • Controllers/DesignationsController.cs
  • Controllers/UserManagementController.cs

See Also

Keywords

  • Organization assignment failure
  • Tenant mismatch
  • Hierarchy inconsistency

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly