locally chaos identity

Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

locally chaos identity

This page is part of the CLI Reference and is generated from the CLI's own help output, so it matches what locally chaos identity --help prints.

For more information see Chaos Engineering.

locally chaos identity

Simulate Entra ID tokens (identity) failure modes.

Simulate Entra ID tokens (identity) failure modes.

A fault command sets the fault's rate. With a scope flag (--name) it adds or
edits a rule instead.

Identity faults also affect locally commands that sign in, such as the deploy
and runbook tools of locally mcp, and locally servicebus. Locally's own
background work (autoscale, diagnostic settings) is not affected.

Examples:
locally chaos identity <fault> --percentage N
  locally chaos identity <fault> reset
  locally chaos identity show
  locally chaos identity reset

Usage

locally chaos identity [flags]
  locally chaos identity [command]

Flags

-h, --help[=true|false]   help for identity

Subcommands

locally chaos identity 403

Answer requests with 403, as when a role assignment has not replicated yet.

Answer requests with 403, as when a role assignment has not replicated yet. On
the control plane the error code is AuthorizationFailed; on a database the
engine's own equivalent error is sent instead.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity 403 --percentage 25
  locally chaos identity 403 --percentage 100 --name my-app

Usage

locally chaos identity 403 [flags]
  locally chaos identity 403 [command]

Flags

-h, --help[=true|false]   help for 403
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity 403 reset

Remove one 403 rule, or put the whole fault back to zero.

Reset the 403 fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity 403 reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity 429

Answer requests with 429 Too Many Requests and a retry hint.

Answer requests with 429 Too Many Requests and a retry hint. On a database the
engine's own throttling error is sent instead.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

--retry-after sets the Retry-After header the fault answers with, such as 5s.
Without one the service's usual hint is sent.

A value flag left out keeps what the row already has; a new rule starts with
none. 'reset' clears a row.

Examples:
locally chaos identity 429 --percentage 25
  locally chaos identity 429 --percentage 25 --retry-after 5s
  locally chaos identity 429 --percentage 100 --name my-app

Usage

locally chaos identity 429 [flags]
  locally chaos identity 429 [command]

Flags

-h, --help[=true|false]    help for 429
      --name string          Scope this rule to one user or application, by name
      --percentage int       How often this fault fires, 0-100 (required)
      --retry-after string   Retry-After this fault answers with, e.g. 5s or 500ms (the service's usual hint when omitted)
      --tenant string        Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity 429 reset

Remove one 429 rule, or put the whole fault back to zero.

Reset the 429 fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity 429 reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity 500

Answer requests with 500 Internal Server Error.

Answer requests with 500 Internal Server Error. On a database the engine's own
equivalent error is sent instead.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity 500 --percentage 25
  locally chaos identity 500 --percentage 100 --name my-app

Usage

locally chaos identity 500 [flags]
  locally chaos identity 500 [command]

Flags

-h, --help[=true|false]   help for 500
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity 500 reset

Remove one 500 rule, or put the whole fault back to zero.

Reset the 500 fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity 500 reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity clock-skew

Issue tokens whose nbf (not before) is 5 minutes in the future, as an authority with a skewed clock does.

Issue tokens whose nbf (not before) is 5 minutes in the future, as an authority
with a skewed clock does.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity clock-skew --percentage 25
  locally chaos identity clock-skew --percentage 100 --name my-app

Usage

locally chaos identity clock-skew [flags]
  locally chaos identity clock-skew [command]

Flags

-h, --help[=true|false]   help for clock-skew
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity clock-skew reset

Remove one clock-skew rule, or put the whole fault back to zero.

Reset the clock-skew fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity clock-skew reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity disable

Turn chaos OFF for the directory and identity.

Turn chaos OFF for the directory and identity.

Disabling keeps every fault's configuration, so a later enable restores it.

The directory and identity surfaces share one master switch: this is the same
switch as 'locally chaos directory disable' and 'locally chaos identity disable'.

Usage

locally chaos identity disable [flags]

Flags

-h, --help[=true|false]   help for disable
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity discovery-unavailable

Answer the OpenID Connect metadata endpoint (/.well-known/openid-configuration) with 503.

Answer the OpenID Connect metadata endpoint (/.well-known/openid-configuration)
with 503.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity discovery-unavailable --percentage 25
  locally chaos identity discovery-unavailable --percentage 100 --name my-app

Usage

locally chaos identity discovery-unavailable [flags]
  locally chaos identity discovery-unavailable [command]

Flags

-h, --help[=true|false]   help for discovery-unavailable
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity discovery-unavailable reset

Remove one discovery-unavailable rule, or put the whole fault back to zero.

Reset the discovery-unavailable fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity discovery-unavailable reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity drop-connection

Close the connection without answering.

Close the connection without answering. The client sees the connection reset,
with no status code or error body.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity drop-connection --percentage 25
  locally chaos identity drop-connection --percentage 100 --name my-app

Usage

locally chaos identity drop-connection [flags]
  locally chaos identity drop-connection [command]

Flags

-h, --help[=true|false]   help for drop-connection
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity drop-connection reset

Remove one drop-connection rule, or put the whole fault back to zero.

Reset the drop-connection fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity drop-connection reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity enable

Turn chaos ON for the directory and identity.

Turn chaos ON for the directory and identity.

Disabling keeps every fault's configuration, so a later enable restores it.

The directory and identity surfaces share one master switch: this is the same
switch as 'locally chaos directory enable' and 'locally chaos identity enable'.

Usage

locally chaos identity enable [flags]

Flags

-h, --help[=true|false]   help for enable
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity incident

Take each resource down for a while, then bring it back.

Take each resource down for a while, then bring it back. Every interval each
resource (or, on the directory and identity surfaces, the tenant) rolls against
the percentage; on a hit every request to it fails for the rolled duration,
answered as an outage would be, then it recovers on its own. Compare outage,
which fails requests for as long as it is armed.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

--seconds and --millis set the duration. A bare number is in the flag's unit;
one with its own suffix, such as 250ms or 1.5s, means what it says. One value N
picks 0 to N each time; MIN-MAX, such as 30-120, picks within that range. A
duration is required whenever the fault fires.

--interval is how often the fault starts, such as 10m. It is required whenever
the fault fires: nothing else sets it off.

A value flag left out keeps what the row already has; a new rule starts with
none. 'reset' clears a row.

Examples:
locally chaos identity incident --percentage 25 --seconds 30-120 --interval 10m
  locally chaos identity incident --percentage 100 --seconds 30-120 --interval 10m --name my-app

Usage

locally chaos identity incident [flags]
  locally chaos identity incident [command]

Flags

-h, --help[=true|false]   help for incident
      --interval string     How often this fault rolls for each resource, e.g. 10m; the first roll lands at a random point within the first interval (required when it fires)
      --millis string       Duration in milliseconds, e.g. 250; N for 0 to N, or MIN-MAX for a range
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --seconds string      Duration in seconds, e.g. 30 or 1.5; N for 0 to N, or MIN-MAX for a range
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity incident reset

Remove one incident rule, or put the whole fault back to zero.

Reset the incident fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity incident reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity invalid-grant

Refuse refresh token redemptions with invalid_grant (AADSTS700082), as if the refresh token had expired.

Refuse refresh token redemptions with invalid_grant (AADSTS700082), as if the
refresh token had expired.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity invalid-grant --percentage 25
  locally chaos identity invalid-grant --percentage 100 --name my-app

Usage

locally chaos identity invalid-grant [flags]
  locally chaos identity invalid-grant [command]

Flags

-h, --help[=true|false]   help for invalid-grant
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity invalid-grant reset

Remove one invalid-grant rule, or put the whole fault back to zero.

Reset the invalid-grant fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity invalid-grant reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity jwks-unavailable

Answer the signing keys endpoint (/discovery/v2.0/keys) with 503, so token validation cannot fetch the keys.

Answer the signing keys endpoint (/discovery/v2.0/keys) with 503, so token
validation cannot fetch the keys.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity jwks-unavailable --percentage 25
  locally chaos identity jwks-unavailable --percentage 100 --name my-app

Usage

locally chaos identity jwks-unavailable [flags]
  locally chaos identity jwks-unavailable [command]

Flags

-h, --help[=true|false]   help for jwks-unavailable
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity jwks-unavailable reset

Remove one jwks-unavailable rule, or put the whole fault back to zero.

Reset the jwks-unavailable fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity jwks-unavailable reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity latency

Hold requests for a random delay before they are handled.

Hold requests for a random delay before they are handled. The response is
unchanged, just late.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

--seconds and --millis set the duration. A bare number is in the flag's unit;
one with its own suffix, such as 250ms or 1.5s, means what it says. The value is
a maximum: each firing picks 0 to N. A duration is required whenever the fault
fires.

A value flag left out keeps what the row already has; a new rule starts with
none. 'reset' clears a row.

Examples:
locally chaos identity latency --percentage 25 --seconds 30
  locally chaos identity latency --percentage 100 --seconds 30 --name my-app

Usage

locally chaos identity latency [flags]
  locally chaos identity latency [command]

Flags

-h, --help[=true|false]   help for latency
      --millis string       Duration in milliseconds, e.g. 250; the maximum: each firing picks 0 to N
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --seconds string      Duration in seconds, e.g. 30 or 1.5; the maximum: each firing picks 0 to N
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity latency reset

Remove one latency rule, or put the whole fault back to zero.

Reset the latency fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity latency reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity msi-unavailable

Fail managed identity token requests with 500 or 503 from the MSI endpoint the app calls.

Fail managed identity token requests with 500 or 503 from the MSI endpoint the
app calls.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity msi-unavailable --percentage 25
  locally chaos identity msi-unavailable --percentage 100 --name my-app

Usage

locally chaos identity msi-unavailable [flags]
  locally chaos identity msi-unavailable [command]

Flags

-h, --help[=true|false]   help for msi-unavailable
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity msi-unavailable reset

Remove one msi-unavailable rule, or put the whole fault back to zero.

Reset the msi-unavailable fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity msi-unavailable reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity outage

Fail requests for as long as the rule is armed, like a region or service that is down.

Fail requests for as long as the rule is armed, like a region or service that is
down. Each request rolls against the percentage, so at 100 every request fails
until the fault is turned off. Each service answers in its own terms, usually
503 Service Unavailable, and a protocol with live connections also closes the
ones open when the outage starts. For downtime that ends by itself, see
incident.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

--retry-after sets the Retry-After header the fault answers with, such as 5s.
Without one the service's usual hint is sent.

A value flag left out keeps what the row already has; a new rule starts with
none. 'reset' clears a row.

Examples:
locally chaos identity outage --percentage 25
  locally chaos identity outage --percentage 25 --retry-after 5s
  locally chaos identity outage --percentage 100 --name my-app

Usage

locally chaos identity outage [flags]
  locally chaos identity outage [command]

Flags

-h, --help[=true|false]    help for outage
      --name string          Scope this rule to one user or application, by name
      --percentage int       How often this fault fires, 0-100 (required)
      --retry-after string   Retry-After this fault answers with, e.g. 5s or 500ms (the service's usual hint when omitted)
      --tenant string        Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity outage reset

Remove one outage rule, or put the whole fault back to zero.

Reset the outage fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity outage reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity reset

Zero every Entra ID tokens (identity) fault and drop every rule.

Zero every Entra ID tokens (identity) fault and drop every rule.

Examples:
locally chaos identity reset

Usage

locally chaos identity reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity show

Print the current Entra ID tokens (identity) chaos configuration.

Print the current Entra ID tokens (identity) chaos configuration.

Examples:
locally chaos identity show

Usage

locally chaos identity show [flags]

Flags

-h, --help[=true|false]   help for show
      --tenant string       Tenant UUID (defaults to the configured default)

locally chaos identity slow-down

Answer device code token polls with slow_down, so the client has to poll less often.

Answer device code token polls with slow_down, so the client has to poll less
often.

Without scope flags this sets the fault's rate on Entra ID tokens (identity).
With --name it adds or edits one rule, leaving the rate and other rules alone.

A rule can be lower than the rate: "everywhere except one place" is a rate of
100 plus a rule at 0.

Examples:
locally chaos identity slow-down --percentage 25
  locally chaos identity slow-down --percentage 100 --name my-app

Usage

locally chaos identity slow-down [flags]
  locally chaos identity slow-down [command]

Flags

-h, --help[=true|false]   help for slow-down
      --name string         Scope this rule to one user or application, by name
      --percentage int      How often this fault fires, 0-100 (required)
      --tenant string       Tenant UUID (defaults to the configured default)

Subcommands

locally chaos identity slow-down reset

Remove one slow-down rule, or put the whole fault back to zero.

Reset the slow-down fault.

With a scope flag, removes that rule so those requests use the fault's rate.
Without one, removes every rule and sets the rate to 0.

'reset --location X' removes the rule; '--percentage 0 --location X' keeps a
rule that never fires, which is how to say "everywhere except X".

Usage

locally chaos identity slow-down reset [flags]

Flags

-h, --help[=true|false]   help for reset
      --name string         Scope this rule to one user or application, by name
      --tenant string       Tenant UUID (defaults to the configured default)
Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

A local cloud for you and your AI agents.

Your Azure infrastructure, running on your machine. Deploy in seconds, break things freely, and ship to Azure when you're ready.