Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
suitewill
11 months agoNew Contributor
Injecting secrets with op command does not work with Work Organization account
I am experiencing the same issue as discussed on this closed thread:
https://1password.community/discussion/137489/how-to-inject-secrets-int-oenvironment-variables-when-using-multiple-accounts
...
1P_Phil
Moderator
3 months agoHi all ( suitewill & michaelyork ),
Thanks for dropping in.
One thing that will help the "op" command to sort out "which account is used" is specifying the VaultID. You can use the "op vault list" command to figure out the ID:
➜ op vault list
ID NAME
lfbku2r3s6asvuf5o73{REDACTED} temp demo vault
fi52webk2lwhpvusk2{REDACTED} throw away vault
then you need to update the URI to use the Vault ID instead of the name of the Vault.
op://{VaultID}/TestScript/API_TOKEN
Let me know if this helps resolve your problem.
All the best,
Phil
michaelyork
3 months agoFrequent Contributor
Thanks for the reply, 1P_Phil . Unfortunately that doesn't resolve the issue (and I think that's been pointed out by other folks in other threads).
Here's my example:
op run --env-file="./.env.optest" -- printenv
[ERROR] 2025/06/27 10:44:13 "Personal" isn't a vault in this account. Specify the vault with its ID or name.
And this is the full content of the env file:
APPLE_WEATHERKIT_TEAM_ID="op://{vault_id}/Apple/{item_id}"
Have also tested this by passing in the `--account` flag. Interestingly, 1Password does prompt to unlock the right account when you do this, but then proceeds to return the same error, trying to look up a "Personal" vault.
- michaelyork3 months agoFrequent Contributor
For what it's worth, 1Password Support responded with this:
Thank you for clarifying the issue you are experiencing, I can confirm that a feature request to allow for multiple accounts to be used from the 1Password desktop app when integrated with 1Password CLI has been raised.
As such, I will attach your report to this feature request to raise awareness within our team for the growing expectation to be able to use multiple accounts within 1Password CLI.
Unfortunately at this time there is not a workaround for this limitation; it is only possible to sign in to a single 1Password account using command.
I apologise that this is not the answer you were looking for on this occasion but if you have any questions or if I can provide further assistance do let me know.
But that doesn't make much sense to me. Clearly the CLI supports multiple accounts (see `op account list`).
All of the posts I see on the forum seem to be about `op run` specifically not working properly in these cases.