Security and access

How to remove a contractor’s access in one afternoon

Access hides in more places than the main login. Work through this list in one sitting, starting with the accounts that control the rest.

By the duyan team · Updated · 4 min read

Security and access

In short

  • List every place first, from your statements, the password manager and each admin page.
  • Start with email, the domain and the password manager, since they can reset the rest.
  • Removing a person leaves many of their keys working, so replace those keys.
  • Change every shared password they could see.
  • Afterwards, watch sign⁠-⁠ins and key use for a week.

Start with a list

Removing access takes an afternoon once you know where it is. Most of the work is finding it.

Ask the contractor for a list of every account, key and server they used. Then check it against your own records, since memory misses things.

Your card statements list each paid service. Your password manager and each service’s admin page show who has access.

Work from the top down. First come the accounts that can reset others: email, the domain and the password manager.

Copy any work you need before you delete anything. Most services let you move files to another user first.

Email and documents

Google Workspace. In the Admin console, suspend the user. Google says this resets their sign⁠-⁠in cookies and app tokens.

Then remove their recovery email and phone, and revoke app passwords and security keys. Move their files to another user before you delete the account.

Microsoft 365. In the Entra admin center, turn off “Account enabled” and select “Revoke sessions”. An app holding a current access token can keep working for up to 1 hour.

In both, look for rules that forward your mail to an outside address. Also check folders shared with their personal email.

Code on GitHub

Remove them from your organisation, or as an outside collaborator. They lose access to your private code, but any copy on their own computer stays.

Then check what a removal leaves behind:

  • Deploy keys in each repository’s settings. These keep working after the person who added them leaves.
  • Tokens that reach your code. Organisation owners can review and revoke fine-grained tokens.
  • Secrets your automated builds use. Replace any they could read.
  • Apps they installed on your organisation.

The cloud console

In AWS, Google Cloud or Azure, remove their user and any roles they hold. Then look for keys that outlive the user.

AWS access keys are long⁠-⁠term, and Google Cloud service account keys stay valid until deleted. Delete any they created, and replace any your systems still use.

Check who can see and change the billing account too.

The domain and DNS

Your domain decides where your email and website go. The registrar account should be in your business’s name, with a login email you control.

Remove their user, change the password and check the contact details on the domain.

ICANN suggests a contact email on another domain. That helps you prove ownership if the domain is hijacked.

At your DNS host, such as Cloudflare, remove their membership. Then delete or roll any API tokens they created.

Payments

In Stripe or your other payment provider, remove them from the team. Then replace every secret and restricted key they could see, as Stripe advises.

A rotated Stripe key can keep working for up to 7 days. Set the old key to expire now instead.

AI providers, keys and connected apps

Remove them from your OpenAI, Anthropic or other AI provider accounts. Delete keys they created, and give running agents new ones.

OpenAI says a deleted key stops working within a few seconds. Test each agent after you switch its key.

Then review the apps connected to your accounts. Google Workspace admins find them under API controls, and Microsoft 365 admins under Enterprise apps.

Remove any app nobody can explain. Some automations may run on the contractor’s own login, so reconnect those to a company account first.

Shared passwords and SSH keys

Suspend them in your password manager, then change every password they could see. 1Password advises assuming a departing person copied the shared passwords.

Start with the accounts that hold money or customer data, then work down.

On each server, remove their key from the authorized_keys file and delete their user. Each line in that file lets one key log in.

If a shared account sends its sign⁠-⁠in codes to their phone, move that to a phone you control.

After the afternoon

Watch sign⁠-⁠ins and key use for a week. Stripe, for example, keeps team members’ account activity for 180 days.

Write down what you changed and where. The next handover then starts from that list.

The list in one place

  • Email and documents: suspend or disable the account, end its sessions, remove recovery details.
  • GitHub: remove the person, then check deploy keys, tokens, build secrets and apps.
  • Cloud console: remove the user and roles, and delete keys they made.
  • Domain registrar: remove their user, change the password, check the contacts.
  • DNS host: remove their membership, and delete their API tokens.
  • Payments: remove them from the team, and replace keys they saw.
  • AI providers: remove them, delete their keys and give agents new ones.
  • Connected apps: remove any app nobody can explain.
  • Password manager: suspend them, then change what they could see.
  • Servers: remove their SSH key and their user.

Taking over what a contractor built?

We review software, automations and agents that you or someone else built, and list what we’d fix first. About a week, $1,200 fixed, and you keep the written findings either way.

Sources

  1. Google Workspace Admin Help, “Maintain data security after an employee leaves”, knowledge.workspace.google.com (accessed 5 November 2026)
  2. Google Workspace Admin Help, “Identify and secure compromised accounts”, knowledge.workspace.google.com (accessed 5 November 2026)
  3. Microsoft Learn, “Revoke user access in an emergency in Microsoft Entra ID”, learn.microsoft.com (accessed 5 November 2026)
  4. GitHub Docs, “Removing an outside collaborator from an organization repository”, docs.github.com (accessed 5 November 2026)
  5. GitHub Docs, “Removing a member from your organization”, docs.github.com (accessed 5 November 2026)
  6. GitHub Docs, “Managing deploy keys”, docs.github.com (accessed 5 November 2026)
  7. GitHub Docs, “Reviewing and revoking personal access tokens in your organization”, docs.github.com (accessed 5 November 2026)
  8. Amazon Web Services, “Manage access keys for IAM users”, docs.aws.amazon.com (accessed 5 November 2026)
  9. Google Cloud, “Best practices for managing service account keys”, docs.cloud.google.com (accessed 5 November 2026)
  10. ICANN, “Do you have a domain name? Here’s what you need to know” (26 March 2018), icann.org (accessed 5 November 2026)
  11. Cloudflare Docs, “Manage account members”, developers.cloudflare.com (accessed 5 November 2026)
  12. Cloudflare Docs, “Roll tokens”, developers.cloudflare.com (accessed 5 November 2026)
  13. Stripe Docs, “API keys”, docs.stripe.com (accessed 5 November 2026)
  14. Stripe Docs, “Start a team”, docs.stripe.com (accessed 5 November 2026)
  15. OpenAI, “API reference: overview” (Authentication), developers.openai.com (accessed 5 November 2026)
  16. Google Workspace Admin Help, “Control which apps access Google Workspace data”, knowledge.workspace.google.com (accessed 5 November 2026)
  17. Microsoft Learn, “Review permissions granted to enterprise applications”, learn.microsoft.com (accessed 5 November 2026)
  18. 1Password Support, “Best practices for securing your 1Password Business account”, support.1password.com (accessed 5 November 2026)
  19. OpenBSD manual, “sshd(8)”, AUTHORIZED_KEYS FILE FORMAT, man.openbsd.org (accessed 5 November 2026)

Bring your hardest question

Ask us about keys, access, where your data goes or who can switch it off.

Read⁠-⁠only by default. Your keys stay yours.