> 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/integrations/resource-integrations/1password/requesting-access.md).

# Requesting 1Password access

How to request a time-limited share link to one item in a 1Password vault via P0

{% hint style="info" %}
The 1Password integration is in beta. Functionality and configuration may change.
{% endhint %}

Request a read-only copy of one item in a 1Password vault through P0. When your request is approved, P0 makes a share link to the item that opens only for the email you sign in to P0 with. The link stops opening when your access time is up.

## Requesting from the P0 CLI

```bash
p0 request 1password item <account> <vault> <item>
```

| Argument    | Description                                                                  |
| ----------- | ---------------------------------------------------------------------------- |
| `<account>` | The 1Password account, by its sign-in address, such as `acme.1password.com`. |
| `<vault>`   | The vault, by its name or its 26-character ID.                               |
| `<item>`    | The item, by its title or its ID.                                            |

For example, to request the `Prod database` item in the `Engineering` vault for one day:

```bash
p0 request 1password item acme.1password.com Engineering "Prod database" --duration 1d --reason "Rotate the replica's password"
```

You can request items only in the vaults that the account's service account can see in 1Password. To list the accounts, run `p0 ls 1password item account`. To list an account's vaults, run `p0 ls 1password item vault --account acme.1password.com`.

To find a vault's ID, open the vault in the 1Password web app. The ID is the end of the page's address, after `%3A`.

If more than one vault in the account has the name you give, or more than one item in the vault has the title you give, P0 refuses the request and lists their IDs. Request again with the ID of the one you need.

Your admin sets how many open requests you can have in an account at a time. A request is open while it's waiting for approval, or is approved and has its link. While you have an open request that the limit counts, P0 refuses a new one, and the message says which kind of request you already have:

| Your admin's limit  | P0 refuses a new request while you have an open one for | The message says you have an open request for |
| ------------------- | ------------------------------------------------------- | --------------------------------------------- |
| One per item        | The same item in the same vault                         | `<item> in <vault>`                           |
| One per vault       | Any item in the same vault                              | `<vault> in <account>`                        |
| One in this account | Any item in the account                                 | `1Password in <account>`                      |

Revoke the open request first. Once you revoke it, or it expires, is denied or fails, you can request again, even if the old link still opens.

## Requesting from Slack or the P0 app

In Slack, the same command works as a slash command: `/p0 request 1password item <account> <vault> <item>`. To fill in a form instead, type `/p0 request` in Slack, or click **Request Access** on the **Access Management** page of the P0 app, then select **1Password** and choose the **Account**, the **Vault** and the **Item**. If your organization has one 1Password account in P0, the form selects it for you.

For every way to request access, see [Requesting access](https://docs.p0.dev/access-management/access-management/just-in-time-access/requesting-access.md).

## How long the link lasts

1Password makes links that last 1 hour, 1 day, 7 days, 14 days or 30 days. P0 rounds the duration you're approved for down to the nearest of these:

| You're approved for          | The link lasts |
| ---------------------------- | -------------- |
| Less than 1 hour             | 1 hour         |
| 1 hour to less than 1 day    | 1 hour         |
| 1 day to less than 7 days    | 1 day          |
| 7 days to less than 14 days  | 7 days         |
| 14 days to less than 30 days | 14 days        |
| 30 days or more              | 30 days        |

So a request for 3 days gets a link that lasts 1 day. P0 refuses a request with no end. Your 1Password account can also limit how long a link lasts, and P0 refuses a request for longer than that limit allows.

## When your request is approved

P0 makes the link and sends it to you in the message that says your access is ready, in Slack, Microsoft Teams or email. The link is also on the request's page in the P0 app, as **Share link**, with **Link expires**, when 1Password stops opening it, and **Opens once**, which says whether the link opens only once.

To open the item:

1. Open the link.
2. Enter the email you sign in to P0 with. 1Password sends a verification code to that address.
3. Enter the code. 1Password shows the item.

The link works for your email only, and you can open it again until it expires. It shows a read-only copy of the item: you can copy its values, but you can't change the item or see the rest of the vault.

Your admin can set an account so that each link opens only once. Then **Opens once** says **yes**, and the message adds "The link opens only once, so copy what you need when you open it." Copy what you need before you close the item, because the link won't open again.

{% hint style="warning" %}
Ending your access in P0 doesn't stop the link. It keeps opening until it expires. If it must stop sooner, ask a 1Password administrator to delete it from the item's sharing history.
{% endhint %}

## Troubleshooting

| Message                                                                                                                                                                                                        | What to do                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `The service account for <account> can't see a vault with the ID or name <vault>.`                                                                                                                             | Check the vault's name or ID with `p0 ls 1password item vault --account <account>`. If the vault isn't listed, the account's service account can't see it. Ask your admin to give P0 a service account that can, as in [1Password](https://docs.p0.dev/integrations/resource-integrations/1password.md#change-the-install-later). |
| `<vault> has no active item with the ID or title <item>.`                                                                                                                                                      | Check the item's title or ID with `p0 ls 1password item item --account <account> --vault <vault>`.                                                                                                                                                                                                                                |
| `More than one vault in <account> is named <vault>. Request one of them by its ID: <IDs>.`, or the same message for an item's title                                                                            | Request again with one of the IDs the message lists.                                                                                                                                                                                                                                                                              |
| `1Password share links always expire, so P0 can't share an item without an end time. Request access for a set duration.`                                                                                       | Request again with `--duration`, such as `--duration 1d`.                                                                                                                                                                                                                                                                         |
| `Your email domain isn't allowed for the 1Password vault <vault>. Ask your P0 admin to check the connector's allowed domains.`                                                                                 | Your P0 email's domain isn't one that your admin allows. An admin changes the allowed domains, as in [1Password](https://docs.p0.dev/integrations/resource-integrations/1password.md#step-2-set-the-allowed-domains).                                                                                                             |
| `1Password's item sharing policy doesn't allow sharing an item with a specific person by email. Ask a 1Password owner or administrator to allow it.`                                                           | A 1Password owner or administrator changes the account's sharing policy. Then request again.                                                                                                                                                                                                                                      |
| `1Password's item sharing policy allows links that last up to <longest>, shorter than the <requested> requested. Request a shorter duration, or ask a 1Password owner or administrator to allow longer links.` | Request again with a shorter duration.                                                                                                                                                                                                                                                                                            |
| `1Password won't share an item with <email> alone. Check that 1Password's item sharing policy allows sharing with this email.`                                                                                 | A 1Password owner or administrator checks that the sharing policy allows sharing with your email address.                                                                                                                                                                                                                         |
| `P0 couldn't reach the 1Password connector. Ask your P0 admin to check its deployment.`                                                                                                                        | An admin checks that the connector is deployed, and that P0 can invoke it.                                                                                                                                                                                                                                                        |
| `The 1Password connector for <account> isn't installed, so P0 can't share its items. Ask your P0 admin to install it.`                                                                                         | An admin installs the connector again, as in [1Password](https://docs.p0.dev/integrations/resource-integrations/1password.md#on-requests).                                                                                                                                                                                        |
| `P0's 1Password connector couldn't read the account's service account token. Ask your P0 admin to check the 1Password install.`                                                                                | An admin checks the token's secret, as in [1Password](https://docs.p0.dev/integrations/resource-integrations/1password.md#on-requests).                                                                                                                                                                                           |
| `1Password is rate limiting the account's service account. Try again in a few minutes.`                                                                                                                        | Request again in a few minutes.                                                                                                                                                                                                                                                                                                   |
| `You already have an open request for <what> (<request ID>). Revoke it, then request again.`                                                                                                                   | Revoke the request the message names, then request again. See [#requesting-from-the-p0-cli](#requesting-from-the-p0-cli "mention").                                                                                                                                                                                               |
| `The 1Password connector for <account> didn't make the link the account's one-time links setting asks for. Ask your P0 admin to update the connector to its current image.`                                    | An admin updates the connector, as in [1Password](https://docs.p0.dev/integrations/resource-integrations/1password.md#on-requests). Then request again.                                                                                                                                                                           |
