Skip to content

vault query must be provided in case of service account #70

@KellerLukas

Description

@KellerLukas

Describe the bug
When using OnePassword.get_item while using a OP_SERVICE_ACCOUNT_TOKEN, then an error message is returned:

Using service account, for supported commands see: https://developer.1password.com/docs/service-accounts/use-with-1password-cli#supported-commands
[ERROR] 2025/01/05 22:26:55 a vault query must be provided when this command is called by a service account. Please specify one either through the --vault flag or through piped input

and eventually a JSONDecodeError is raised

To Reproduce
Steps to reproduce the behavior:

  1. have OP_SERVICE_ACCOUNT_TOKEN set as env variable
  2. run the following code:
from onepassword import OnePassword
op = OnePassword()
item_uuid = "myuuid"
op.get_item(uuid=item_uuid)

Expected behavior
I want to be able to specify the vault uuid as required.

using 1password v1.0.9, 1password-cli v2.30.3 and python v3.13 on macOS Sequoia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions