Forum Discussion

CaptainNetopie's avatar
CaptainNetopie
New Contributor
1 month ago

Using a Service Account token to grant a connect server acces to a vault

Hey.


I'm using a service account token in a GitLab CI/CD pipeline, where I first install the 1Password CLI. It works great when i create a vault and give permissions to some groups on that vault.

I would like to use the command "op connect vault grant" to give our Connect Server access to that newly created vault, so that I can subsequently use our Connect Server and do operations on that newly created vault.

However I am encountering the following error: 

$ op connect vault grant --server OUR-SERVER --vault "VAULT_NAME"

[ERROR] 2026/02/18 16:35:30 There are 0 servers that match {"OUR-SERVER"}. Try again and specify the servers's UUID instead.

This is a bit weird since I can type in that command locally, using 1password CLI, and it works great. 
I suspect that Service Account tokens cannot grant vault permissions to Connect servers, but i'd like to be sure.

If it is the case, what alternative could be used to obtain the same behaviour ? The goal here is obviously to not have to do anything manually, and it is still secure since all our credentials and secrets are stored in Gitlab CI/CD variables.

Thanks 

Edit: I also tried with the server ID instead of its name, but same result.

Edit2: It is not possible, there is an "Unsupported commands" small blue paragraph in this documentation that I missed:

https://developer.1password.com/docs/service-accounts/use-with-1password-cli/#supported-commands

No RepliesBe the first to reply