· SecureCyberInsight

Non-Human Identity Security for SMBs: Control AI Agent Tokens, Service Accounts, and API Keys

Learn how SMBs can secure non-human identities with an inventory, owners, expiring tokens, least privilege, AI agent controls, access reviews, and monitoring.

Most small and mid-sized businesses know how many employees they have. Few know how many non-human identities they have. These are the service accounts, API keys, access tokens, bots, connected apps, and AI agents that log in to business systems without a person typing a password.

That blind spot is growing fast. Every new SaaS integration, automation workflow, and AI tool adds credentials. Many are created in a hurry, given broad access, and never reviewed again. Attackers know that a forgotten token is often easier to steal and slower to be noticed than an employee password.

In November 2026, BlueFlag Security's State of Developer Risk 2026 report put numbers on the problem. Across the organizations it measured, non-human identities with code repository access outnumbered human developers eight to one. Of the repository access tokens measured, 99% had no expiration date, 84% could change code, and 47% had gone unused for more than 90 days without being revoked. AI agents were part of the picture: 83% of organizations had unapproved AI coding agents, and 68% of the identities those agents ran under held administrator permissions.

What counts as a non-human identity

A non-human identity is any credential that lets software act on its own or on someone's behalf. Common examples in an SMB include:

  • Service accounts that run backups, scanners, line-of-business apps, and scheduled jobs
  • API keys for payment processors, email platforms, AI models, and cloud services
  • Personal access tokens and OAuth grants that connect tools such as code repositories, CRMs, and file sharing
  • Connected SaaS apps that employees authorize to read email, calendars, or documents
  • Bots and automation workflows built in tools such as Power Automate, Zapier, or CI/CD pipelines
  • AI assistants and agents that read data, call tools, and take actions using delegated or dedicated credentials

Each one is a key to part of the business. Together, they often hold more access than the people they serve.

Why AI agents raise the stakes

AI agents make the non-human identity problem bigger in three ways.

First, they multiply credentials. An agent may need access to email, files, a ticketing system, and a code repository, and each connection usually means another token or OAuth grant.

Second, they inherit or hold broad permissions. An AI assistant that works under an employee's account gets everything that employee can reach. An autonomous agent with its own service account often gets administrator rights because that is the fastest way to make it work.

Third, their actions are hard to tell apart. When an agent acts through a person's account, the audit log may show the person's name. Without tagging or separate identities, investigators cannot easily tell which actions came from a human and which came from AI.

The risks of unmanaged non-human identities

  • Long-lived credentials: tokens and keys without an expiration date stay valid long after a project, contractor, or integration ends
  • Excess privilege: broad scopes such as full repository, mailbox, or tenant access turn a single stolen key into a major incident
  • No clear owner: when nobody is responsible for a credential, nobody notices misuse or removes it
  • Secrets in the wrong places: keys stored in code, shared documents, chat messages, or AI prompts are easy to leak
  • Weak monitoring: non-human activity rarely triggers the sign-in alerts built for people
  • Supply chain exposure: a breach at a connected vendor can expose the tokens you granted it

Seven controls SMBs can put in place

1. Build a non-human identity inventory

Start by listing every service account, API key, token, connected app, bot, and AI agent you can find. Check your identity provider, Microsoft 365 or Google Workspace app consents, code repositories, cloud consoles, and key SaaS admin panels. Record what each identity does, what it can reach, and when it was last used.

2. Assign a human owner to every identity

Every non-human identity should have a named owner who can explain why it exists. If no one claims an identity during the inventory, disable it and see what breaks. Unclaimed credentials are the ones attackers find first.

3. Set expiration dates and rotate secrets

Require expiration dates on personal access tokens, API keys, and app secrets. Short lifetimes of 30 to 90 days work for most use cases. Where possible, replace static secrets with short-lived credentials, managed identities, or workload identity federation so there is nothing long-lived to steal.

4. Enforce least privilege

Grant only the scopes each identity needs. Use read-only access where writing is not required. Limit repository tokens to specific repositories instead of every repository. Remove administrator rights from service accounts and AI agents unless there is a documented, approved reason.

5. Give AI agents their own governed identities

Approve the AI tools and agents your organization uses and block the rest. Run autonomous agents under dedicated identities instead of shared or personal accounts, so their activity is visible and can be shut off quickly. Require human approval before agents merge code, send external messages, move money, or change security settings. Tag AI-generated commits and actions so they can be traced.

6. Store secrets in a vault, not in code or prompts

Keep API keys and tokens in a secrets manager or your cloud provider's key vault. Turn on secret scanning in code repositories. Tell employees never to paste keys into AI chat tools, tickets, or shared documents. Rotate any secret that has been exposed, even briefly.

7. Review access and monitor activity

Add non-human identities to your quarterly access reviews. Remove anything unused for 90 days. Alert on unusual behavior such as a token cloning many repositories, a service account signing in from a new location, or an API key suddenly spending far more than normal. Make sure your incident response plan explains how to revoke and replace non-human credentials quickly.

A practical 30-day plan

  • Week 1: Inventory service accounts, API keys, tokens, connected apps, and AI agents in your most important systems.
  • Week 2: Assign owners, disable unclaimed identities, and revoke anything unused for more than 90 days.
  • Week 3: Add expiration dates, reduce scopes, remove unnecessary administrator rights, and move exposed secrets into a vault.
  • Week 4: Publish an approved AI agent list, add non-human identities to access reviews, and set up monitoring alerts.

Repeat the inventory every quarter, because new integrations and AI tools appear constantly.

Questions leaders should ask

  • How many non-human identities do we have, and who owns each one?
  • Which tokens and keys never expire?
  • Which AI agents can change code, send email, or access customer data?
  • Would we notice if a service account started behaving differently tonight?
  • How quickly could we revoke every credential tied to a compromised vendor or tool?

The bottom line

Service accounts, tokens, API keys, and AI agents now outnumber the people in many business environments, and they often hold more access with less oversight. SMBs can close most of this gap with an inventory, clear owners, expiring credentials, least privilege, governed AI agent identities, a secrets vault, and regular access reviews.

Secure Cyber Insight helps small and mid-sized organizations build practical cybersecurity and AI governance programs. Use this guide to make sure every key to your business has an owner, an expiration date, and a reason to exist.