Join our Newsletter — 33% off our NHI Course
Home› Guides› What to do when the owner of a…
Guide Non-Human Identity (NHI)

What to do when the owner of a service account leaves: handover, rotation and reassignment in one leaver workflow

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 15 min read
On this page

When the owner of a service account leaves, treat the departure as a credential event as well as a people event: hand over knowledge, reassign accountability and rotate any secret the leaver could have seen, in that order and before the last working day where you can. Most joiner, mover and leaver processes were designed for human accounts. They disable the leaver's own login, recover the laptop and remove group memberships. They rarely ask the more awkward question: which non-human identities did this person own, and what did they know about them?

This guide describes a leaver-triggered workflow for service accounts, application registrations, service principals, API keys and automation credentials. It assumes you already have, or are building, an inventory with an owner field. If you are dealing with accounts that already have no owner at all, start with the companion guide on How to assign owners to orphaned service accounts; this page is about stopping a known owner's departure from creating new orphans in the first place.

Key takeaways

  • An owner's departure should fire a specific workflow for every non-human identity linked to that person, not just the standard human offboarding steps.
  • Ownership must be reassigned to a named successor before the leaver goes. A team alias or deputy recorded in advance turns this from a scramble into a routine change.
  • Any credential the leaver could have read, copied or stored should be rotated after they leave, even if you trust them. Rotation removes the question rather than relying on goodwill.
  • Cloud application owners hold real administrative power over the application. Removing the leaver as an owner is a security control, not housekeeping.
  • Unplanned departures need a compressed version of the same workflow, with rotation moved to the front.
  • Measure the result: the number of non-human identities whose recorded owner is a disabled or deleted user account should trend towards zero.

Why an owner leaving is a credential event

A service account owner is usually the person who created the account, chose its permissions, set its password or generated its key, and wired it into an application. Microsoft's governance guidance for on-premises service accounts defines the owner simply as the person accountable for maintaining the account, and recommends recording purpose, permission scope, risk profile and an anticipated lifetime with periodic attestation for each one. That accountability does not transfer automatically when someone resigns.

Two separate risks appear the moment the owner leaves:

  • Accountability gap. Nobody now answers review and attestation requests, approves permission changes or notices when the account behaves strangely. The account drifts towards the orphaned state, where removing it feels too risky and keeping it is nobody's decision.
  • Knowledge exposure. The leaver may still know, or hold a copy of, the credential. Passwords set by hand, keys downloaded to a workstation, secrets pasted into a personal notes file or a local script, and tokens cached in a command line tool all leave the organisation's control when the person does.

Disabling the leaver's own user account closes neither gap. The service account keeps working, which is exactly what you want for the business process, and keeps accepting the same credential, which is exactly what you do not want. This pattern sits close to two entries in the OWASP Non-Human Identities Top 10 2025: improper offboarding and long-lived secrets. In ATT&CK terms, a credential retained by a former insider is simply T1078 Valid Accounts, which is why detection alone is a weak control here.

What the owner may know or hold

Before you can hand over or rotate, you need to know what is in scope. For each departing person, build a short list of everything they own or have operated. Useful sources include:

  • The non-human identity inventory or CMDB, filtered by owner and deputy fields.
  • Directory attributes such as the description or manager fields on Active Directory service accounts. Microsoft suggests using the description attribute to record the service account owner, for example a team alias.
  • Cloud application registrations and enterprise applications where the leaver is listed as an owner.
  • Secrets vault access policies and audit logs showing which secrets the leaver read or created.
  • Source control: repositories, pipeline variables and deployment keys the leaver created or administered.
  • Scheduled tasks, scripts and automation runbooks that run under accounts the leaver configured.
  • SaaS integrations, personal access tokens and OAuth grants created in the leaver's name that a team process depends on.

Classify each item by what the leaver could have seen. A useful scale is:

Exposure classExampleDefault action after departure
Credential never visible to humansGroup managed service account, workload identity federation, managed identityReassign owner; no rotation needed for exposure, but review permissions
Credential held in a vault, leaver had read accessService account password or API key in a secrets managerReassign owner; rotate; review vault audit trail
Credential set or generated by the leaver by handPassword typed at creation, key downloaded to a laptopReassign owner; rotate as a priority
Credential tied to the leaver's own identityPersonal access token, OAuth grant, key under the leaver's userReplace with a proper non-human identity, then revoke

The last row is the one that breaks things. If a production job authenticates with a token issued to the leaver's user account, disabling that user will break the job. Find these early in the notice period so they can be migrated deliberately rather than discovered as an outage.

The leaver trigger: connecting HR to the inventory

The workflow only works if it starts reliably. Most organisations already have a leaver event from the HR system that drives the Joiner-Mover-Leaver Guide process. Extend that event rather than creating a parallel one:

  1. Subscribe the inventory to leaver events. When HR records a termination date, the identity platform or a small integration queries the inventory for every non-human identity where the leaver is owner or deputy.
  2. Open one ticket per leaver, with a line per identity. One ticket per account creates noise; one ticket for the whole person with an itemised list is easier to track and close.
  3. Route the ticket to the leaver's manager and the owning team. The manager decides who the successor is. The leaver is a contributor, not the approver.
  4. Set a deadline before the last working day. Handover needs the leaver present. Rotation and owner removal can happen on or just after the last day.
  5. Treat movers the same way. NIST SP 800-53 separates PS-4 Personnel Termination and PS-5 Personnel Transfer. Someone moving to another department is often still able to reach the vault and the repository, so ownership should follow the job, not the person.

If your inventory has no owner field, or most owners are blank, the trigger has nothing to match on. Fix that first through an ownership campaign; see the NHI Ownership Guide for how to define the role.

Handover during the notice period

The notice period is the only time the person with the most context is available. Use it for knowledge transfer, not for rotation. A short, structured handover for each identity should capture:

  • Purpose and consumers. Which applications, jobs or integrations use the identity, and what breaks if it stops.
  • Where the credential lives. Every location: vault path, pipeline variable, configuration file, application setting, scheduled task, any copy on a workstation.
  • How to rotate it. The exact steps, the order of updating consumers, and how to confirm success. If no runbook exists, write one now; the Secrets Rotation Runbook Template gives a structure.
  • Why it has the permissions it has. The justification for each group membership or role. Microsoft's guidance warns that service accounts should not be members of privileged groups, so this is also the moment to question any that are.
  • Known quirks. Hard-coded hostnames, undocumented dependencies, seasonal jobs that run once a quarter.

Record the handover in the inventory or the CMDB, not in an email. Microsoft's on-premises governance article suggests a record per service account that includes the owner, a deputy, the review cadence and risk classification. Adding the handover notes to that same record means the next owner change starts from a better position.

Ask the leaver one direct question for each identity: do you have a copy of this credential anywhere outside the vault? Most people will answer honestly. The answer helps you prioritise rotation, but it does not replace rotation.

Reassigning ownership

Ownership reassignment is a formal change, approved by the leaver's manager or the owning team lead and accepted by the successor. Practical rules:

  • Name a person, not only a team. A team alias in the description field is valuable as a fallback, but reviews and attestations need a human who will answer.
  • Keep a deputy. Microsoft's example service account record lists an owner and a deputy. If a deputy already exists, promoting them is the fastest route, and a new deputy can be appointed afterwards.
  • Prefer the consuming team. The owner should be someone who understands the business process the account supports, which is usually the application team rather than the infrastructure team that created it.
  • Make the successor attest. The new owner confirms the account is still needed and its permissions are justified. If they cannot, the account goes into a retirement track, not a carry-forward track.
  • Update every place the owner is recorded. Inventory, CMDB, directory description, cloud owner lists, vault access policy and on-call rota.

Reassignment is also a natural point to reduce risk. If a high-risk user-based service account is changing hands, consider whether it can move to a managed service account. Microsoft's guidance is to test whether a service can use a managed service account and to use one if it can, with group managed service accounts preferred for on-premises services. The How to convert AD service accounts to gMSA guide covers the migration. Once the password is managed by the directory, the next owner change carries no exposure at all.

Rotating credentials after the owner leaves

Rotate after the leaver's access ends, not before. Rotating while they still have vault access only gives them the new value. The sequence that works in practice is:

  1. Remove the leaver's access paths. Disable their user account, remove them from vault policies, revoke their sessions and tokens, and remove them as an owner of cloud applications.
  2. Rotate the credential. Generate a new secret, password or key in the vault, using the runbook captured at handover.
  3. Update every consumer. Work through the list of credential locations from the handover. Missed copies are the most common cause of outages and of partial rotations that leave the old value valid.
  4. Confirm the old credential no longer works. Where the platform supports two credentials at once, such as two client secrets on an application, remove the old one explicitly after the new one is in use. A rotation that adds a new key but never revokes the old one has not reduced exposure; the Incomplete rotation breaches page explains why this matters.
  5. Watch for use of the old credential. Failed authentications with the old secret in the days after rotation tell you either that a consumer was missed or that someone is trying it.

Prioritise by exposure class and privilege. A credential the leaver typed by hand for an account with broad directory rights should be rotated on the last day. A vault-held key for a read-only reporting integration can join the next scheduled rotation window, provided it is within days rather than months. If you are rotating many credentials at once across several leavers, the Credential Rotation at Scale guide covers batching and automation.

For directory user accounts used as service accounts, Microsoft's governance guidance suggests setting the account so it cannot change its own password, and setting an expiry aligned to the review period unless the owner confirms continued need. Both are useful after a handover: the expiry forces the new owner's first attestation, and the password control stops an application or person changing the credential outside the process.

Cloud application and service principal owners

Cloud identity platforms often give the owner of an application direct control over it. Microsoft's documentation for Microsoft Entra states that owners have the same permissions as application administrators, scoped to an individual application, including single sign-on, provisioning, user assignment and adding or removing other owners. It also notes that a user who registers an application is added as its owner automatically, and that the application may hold more permissions than the owner, so an owner can act with the application's privileges.

That has two consequences for leavers:

  • Owner removal is an access revocation. If the leaver's user account is ever re-enabled, restored or reused, owner rights come back with it. Remove the leaver from the owner list explicitly rather than relying on the disabled account.
  • Single-owner applications become ownerless. Microsoft recommends monitoring applications so there are at least two owners where possible, and using the serviceManagementReference property on the application object to record a team contact. Both make the leaver workflow simpler: the second owner becomes the default successor, and the reference tells you which team to ask.

Microsoft also notes that groups cannot be assigned as owners of enterprise applications, so the deputy rule matters even more here. A named second owner is the only built-in safeguard against an application losing its last owner when someone leaves.

The same logic applies to other platforms with an owner or administrator concept on applications, integrations, bots and automation accounts. Check each platform's documentation for what owner rights include, and add an owner-removal step for each to the leaver ticket.

Unplanned departures

Not every leaver serves notice. Dismissals, sudden resignations and absence that becomes permanent all remove the handover window. The workflow still applies, but the order changes:

  1. Revoke the leaver's access paths immediately, including vault access and cloud owner rights.
  2. Rotate high-privilege and hand-set credentials first, using whatever runbook exists. Where none exists, the owning team reconstructs consumer lists from logs, configuration management and the vault audit trail.
  3. Assign an interim owner, usually the deputy or the team lead, with a review date to confirm or hand on.
  4. Increase monitoring on the affected identities for unusual source addresses, new permissions or use of revoked credentials.

If there is any sign that the former owner has used a retained credential, stop treating this as a process task and move to incident response. The Leaver Retained Access Incident Playbook covers scoping and containment.

Measuring the workflow

A leaver workflow that nobody measures decays quickly. Three indicators are enough to start:

  • Owner validity: the count of non-human identities whose recorded owner is a disabled, deleted or departed user. This should be close to zero and investigated weekly.
  • Time to reassign: days between the HR termination date and closure of every ownership line on the leaver ticket.
  • Rotation completion: the share of in-scope credentials rotated within the target window after the last working day, with the old credential confirmed revoked.

Report these alongside the normal human offboarding metrics. A leaver is not fully offboarded while they remain the recorded owner of a production identity, or while a credential they set by hand is still valid.

Common failure patterns

  • Offboarding stops at the human account. The user is disabled, the service accounts they owned keep running with the same credentials, and nobody is now accountable for them.
  • Owner field points at a departed person for months. Review emails bounce, attestations are skipped and the account quietly becomes orphaned.
  • Rotation before revocation. The credential is rotated while the leaver still has vault access, so they can read the new value.
  • Partial rotation. A new key is added but the old one is never removed, or one consumer still holds the old password and someone re-adds it to fix the outage.
  • Production running on a personal token. Disabling the leaver breaks a pipeline or integration, and the emergency fix is to re-enable the leaver's account.
  • Team alias as the only owner. The alias still exists, but no individual feels responsible for answering reviews.
  • Movers ignored. A person changes role, keeps access to the vault and repository, and remains the owner of identities they no longer support.

Practitioner checklist

  • Extend the HR leaver and mover events to query the inventory for every non-human identity where the person is owner or deputy.
  • Open a single leaver ticket with one line per identity, routed to the leaver's manager and the owning team.
  • Classify each identity by exposure: credential never human-visible, vault-held, set by hand, or tied to the leaver's own identity.
  • Capture a structured handover for each identity during the notice period, including every credential location and a rotation runbook.
  • Reassign ownership to a named successor who attests to need and permissions; appoint a new deputy.
  • Remove the leaver from vault policies, cloud application owner lists and any other owner role before rotating.
  • Rotate credentials in priority order, update every consumer and confirm the old credential is revoked.
  • Migrate any production dependency on the leaver's personal tokens to a proper non-human identity before the last day.
  • Consider moving high-risk user-based service accounts to managed service accounts at the point of handover.
  • Track owner validity, time to reassign and rotation completion as standing metrics.

Standards and references

Related NHI Mgmt Group resources: How to assign owners to orphaned service accounts · Joiner-Mover-Leaver Guide · NHI Ownership Guide · Leaver Retained Access Incident Playbook

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.