Skip to main content

Troubleshoot Leave Authentication and Access

Summary

Safe triage for login, unauthorized, unavailable-route, and access-scope failures.

Audience

Employees or administrators affected by the scenario, first-line support, QA, service owners, and architects.

Symptoms

The Leave menu is absent, a deep link redirects, Unauthorized is shown, or the API returns an authentication/authorization failure.

Scope

Client navigation, ProtectedRoute, authenticated tenant context, and Leave API access.

Cause

The cause must be confirmed from current state and source-backed evidence.

Likely causes

  • No valid client authentication state
  • Tenant user context is missing or is a super-admin context
  • Required module/route capability is unavailable
  • API authorization differs from client visibility

Safe diagnostic steps

  1. Confirm the expected tenant login context and that the user can access another permitted protected page.
  2. Record whether the menu is absent, Unauthorized renders, or an API response denies access.
  3. Compare the route guard evidence with the server response category; do not inspect or copy tokens.

Resolution

Re-authenticate through the approved tenant login flow or ask an authorized administrator to review assigned access. Do not alter browser storage or claims as a workaround.

Safe resolution

Use only the resolution above and approved operational processes. Do not modify databases, replay messages, bypass authorization, or repeat ambiguous state-changing actions.

Validation

Open the permitted Leave entry point and complete a safe read-only request.

Evidence to collect

Collect the safe UTC window, route/operation category, response/status category, deployed version, affected scope count, and a correlation identifier. Exclude credentials, tokens, personal Leave details, employee identifiers, payloads, configuration values, and private topology.

Escalation

Identity/security for authentication or claims; platform administration for feature assignment; Leave owner for API parity.

Source References

  • UI/salary-ui/apps/client-hrms-portal/src/utils/ProtectedRoute.tsx
  • UI/salary-ui/apps/client-hrms-portal/src/components/AppLayout.tsx
  • microservices/src/leave-service/Program.cs

See Also

Keywords

  • Leave troubleshooting
  • Troubleshoot Leave Authentication and Access
  • Safe diagnostics

Revision Information

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