Skip to main content

How to export passwords from 1Password

This page contains the steps and requirements needed to export passwords from the Ministry of Justice 1Password Org.

The document only contains steps to export the Ministry of Justice organisation.

Exporting all Vaults

Prerequisites

  1. Click the 3 dots at the top left of the 1Password App
  2. Press export -> Ministry of Justice
  3. Enter your password
  4. Press Export

Assigning Export permissions to all Vaults

Please ensure you run the second script to remove all Export permissions given as part of this process after completing

Prerequisites

  1. Run the following commands to add permissions
export ADMIN_GROUP_NAME="Administrators"

# Get the UUID of the Administrators group
ADMIN_GROUP_UUID=$(op list groups | jq -r '.[] | select(.name == "'$ADMIN_GROUP_NAME'") | .uuid')

# Get the UUIDs of the vaults that the Administrators group is part of
VAULT_UUIDS=$(op list vaults | jq -r '.[] | select(.groups[].uuid == "'$ADMIN_GROUP_UUID'") | .uuid')

# Grant export permissions to each vault
for VAULT_UUID in $VAULT_UUIDS; do
  op vault add $VAULT_UUID --permission=Export
done
  1. Run the following commands to remove permissions
export ADMIN_GROUP_NAME="Administrators"

# Get the UUID of the Administrators group
ADMIN_GROUP_UUID=$(op list groups | jq -r '.[] | select(.name == "'$ADMIN_GROUP_NAME'") | .uuid')

# Get the UUIDs of the vaults that the Administrators group is part of
VAULT_UUIDS=$(op list vaults | jq -r '.[] | select(.groups[].uuid == "'$ADMIN_GROUP_UUID'") | .uuid')

# Remove export permissions from each vault
for VAULT_UUID in $VAULT_UUIDS; do
  op vault remove $VAULT_UUID --permission=Export
done

Links

This page was last reviewed on 5 June 2024. It needs to be reviewed again on 5 September 2024 by the page owner #operations-engineering-alerts .
This page was set to be reviewed before 5 September 2024 by the page owner #operations-engineering-alerts. This might mean the content is out of date.