> For the complete documentation index, see [llms.txt](https://docs.p0.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.p0.dev/access-management/access-management/just-in-time-access/approving-access/p0-allow-workflows.md).

# P0 allow modal, CLI, and UI

Configure P0 allow pre-approvals from Slack, the CLI, or the P0 web app.

## Overview

`p0 allow` creates **standing pre-approvals** so specific principals can receive access automatically when they request it. Team members can configure these allows from three entry points:

* **Slack allow modal** for guided form-based setup
* **`p0 allow` CLI** for scripted or bulk automation

Every allow captures the same core fields: the target resource, the principal (`--to`), and the auto-approval window, set with `--start` and `--end`.

> You must be an approver for the target resource according to the rules configured in [Policy Studio](/policy-studio/policy-studio.md) before you can create or edit an allow.

## Slack Allow Modal

Slack provides an interactive modal when you launch `/p0 allow` without full arguments. Use it when you prefer a visual form but want to stay in Slack.

### Launching the modal

* Type `/p0 allow` in any direct message or channel where the P0 bot is installed.
* (Optional) Include a partial command like `/p0 allow aws` to pre-populate the provider and resource fields.
* Press **Enter**. Slack opens the **Allow access** modal.

### Completing the form

The modal walks you through:

1. **Provider & target**: Choose the cloud/platform and specify the resource (for example, IAM role, project, permission set).
2. **Principal**: Email or directory identifier for the user, group, or service account.
3. **Auto-approval window**: Select a start and end date and time (maps to `--start` and `--end`). The modal defaults to the current time plus one week.
4. **Reason (optional)**: Appears in audit logs and request history when requestors receive access.

Submit the modal to create the preapproval. P0 confirms in DM and posts to the approval channel if configured. The modal’s interactive blocks provide inline validation (including date/time pickers), so you see errors such as missing `--to` or a malformed date before submission.

## CLI `p0 allow`

Use the CLI when you need automation, version-controlled workflows, or provider-specific flags. The command accepts the same data as the modal but allows you to script or template it.

```bash
p0 allow <provider> <subcommand> [resource args…] \
  --to <principal> \
  --end <timestamp> \
  [--start <timestamp>] \
  [--reason <text>] \
  [--wait]
```

Key tips:

* Run `p0 allow <provider> --help` for resource-specific arguments (for example, `--project`, `--account`).
* `--start` and `--end` accept ISO 8601 and common date formats.
* Combine with `p0 ls` to discover requestable resources before issuing the allow.
* Use `--wait` when you want the CLI to block until backend provisioning completes.

See `p0-cli/p0-commands-and-usage/p0-allow.md` for full examples covering AWS, GCP, SSH, and other providers, plus troubleshooting guidance in `p0-cli/troubleshooting/p0-allow.md`.

## Operational Best Practices

* **Align access policies first.** Ensure the allow creator appears as an approver for the resource; otherwise the modal and UI block creation.
* **Default to shorter windows.** Set the nearest `--end` that satisfies the project needs and rely on renewals when necessary.
* **Capture justification.** Require reasons via access policy options (`requireReason: true`) so audit logs show why the standing access exists.
* **Review regularly.** Schedule periodic reviews of the **Pre Approvals** tab in Access Management or use the CLI to script an inventory (`p0 allow list --json`).

## Related Resources

* [Pre-approving access](/access-management/access-management/just-in-time-access/approving-access/pre-approving-access.md)
* [p0 allow](/p0-cli/p0-commands-and-usage/p0-allow.md)
* [Policy Studio](/policy-studio/policy-studio.md)
