Run-as user

Also known as: run-as account

On this page 7

A run-as user is the identity under which an automated workflow, scheduled job, script or bot executes. It determines which systems the automation can reach, which data it can read or change, and whose name appears in audit logs for every action it takes. In automation security, choosing the run-as user, also called the run-as account, is one of the most consequential decisions, because the automation inherits every permission that identity holds.

The run-as user can be the person who built the workflow, the person who triggers it, a dedicated service account or a managed workload identity. Each choice shifts risk differently: a personal identity is easy to set up but ties a business process to one employee, while a dedicated non-personal identity requires more administration but gives clear accountability and least-privilege control.

How the run-as identity is applied

When an automation starts, the platform establishes a security context for it. On an operating system, this may mean launching a scheduled task under a specified account, or a Unix job under a given user through a mechanism such as sudo. In workflow and integration platforms, the run-as identity is typically expressed through connections: each connector step authenticates with stored credentials or tokens that belong to a particular user or service principal.

Two related but separate concepts are often confused. The workflow owner is the person who can edit and manage the automation, while the run-as user is the identity that actually performs the actions at run time. A workflow owned by an analyst may still run as a service account, and that separation is usually desirable.

TechnologyHow the run-as user is setTypical credential
Operating system schedulerAccount specified on the task or jobLocal or domain account password
RPA platformRobot account on the runtime machineVaulted Windows credentials
Low-code workflow toolConnection owner per connectorOAuth token of a user or service
Cloud automation serviceAssigned role or managed identityShort-lived platform token
CI/CD pipelinePipeline service connectionFederated or secret-based identity
Where run-as identities appear across automation technologies

Types of run-as identities

Run-as identities fall into a few categories, and the right one depends on whether the automation acts on behalf of a specific person or on behalf of the organization. Personal context is appropriate when a user triggers an automation for their own work and the results should respect their own access rights.

Identity typeAdvantageMain riskSuitable for
Creator’s personal accountQuick to set upBreaks when the person leavesPersonal productivity flows
Triggering userRespects caller’s own rightsInconsistent results per userAttended, on-demand automations
Dedicated service accountStable, auditable, scopedCredential sprawl if unmanagedShared business processes
Managed workload identityNo stored secretsLimited to one platformCloud-native automation
Shared generic accountSimple licensingNo individual accountabilityAvoid where possible
Run-as identity types and their trade-offs

Managed identities, where the platform issues short-lived tokens automatically, are the strongest option when available, because there is no password or long-lived secret to leak or rotate.

The run-as user is closely linked to the service account, but the terms are not identical. A service account is a type of identity; run-as describes the role an identity plays for a given automation. A service account can be the run-as user for many automations, and a run-as user can also be a human account. Workflow permissions control who may edit or trigger an automation, whereas the run-as identity controls what the automation itself can do.

  • Credential vault stores the secrets that let the run-as identity authenticate.
  • Connector permissions limit what each connection can access within a platform.
  • Shared connections let several workflows reuse one identity, which amplifies its impact.
  • Audit trail records actions under the run-as identity, so its choice shapes accountability.

Choosing and configuring a run-as user

The guiding principle is least privilege: the run-as identity receives only the permissions the automation needs, scoped to specific resources rather than whole systems. A dedicated identity per automation or per closely related group of automations keeps the blast radius small if credentials are compromised or a workflow misbehaves.

SituationRecommended run-as userReason
Team process running dailyDedicated service accountSurvives staff changes
User runs a flow on own filesTriggering userRespects existing access
Cloud function calling cloud APIsManaged identityNo secrets to manage
Bot updating finance recordsScoped robot accountAuditable and restricted
Quick prototypePersonal account, temporaryMigrate before production use
Decision guide for selecting a run-as user

Each non-personal run-as identity should have a named human owner, a documented purpose, interactive sign-in disabled where possible, credentials kept in a vault and a regular access review, commonly quarterly or semiannual depending on sensitivity.

Risks and common mistakes

The most widespread problem is automations running as their creators. When that person changes role, loses a license or leaves, the workflows fail or, worse, keep running with permissions that should have been revoked. Another serious risk is privilege escalation: if a low-privileged user can edit a workflow that runs as a highly privileged account, that user can make the automation do anything the account can do.

  • Administrator rights granted to a run-as account for convenience.
  • One shared account used by dozens of unrelated workflows.
  • Passwords set never to expire and stored in scripts.
  • No monitoring of sign-ins or unusual activity by automation identities.
  • Editing rights not aligned with the power of the run-as identity.

The simple explanation

Every automated task has to act as someone. The run-as user is the badge the automation wears when it walks into other systems. Whatever doors that badge opens, the automation can open too.

If the badge belongs to a real employee, problems start when that employee leaves. If the badge opens every door, a single mistake can cause serious damage. The safe approach is a dedicated badge that opens only the doors the task needs, with a named person responsible for it.

How it is used in practice

A finance department had built about thirty automations for invoice approvals and payment reports, and almost all of them ran under the account of one analyst. When that analyst moved to another company, the account was disabled and the month-end close stopped overnight.

The automation team migrated the workflows to three dedicated run-as accounts: one for reading the accounting system, one for posting approved invoices and one for distributing reports. Each received only the permissions required, interactive sign-in was blocked, credentials moved into a vault and the finance controller became the named owner. Editing rights for the posting workflows were limited to two administrators. The next staff change caused no interruption, and auditors could see exactly which account posted every invoice.