Forum Discussion

Former Member's avatar
Former Member
4 years ago

op signout does not work

Currently my device and session are tied to my main account for CLI. I'm trying to switch my default account to a secondary service account to run scripts. Whenever I try to run scripts using a service account, I get an error that 1Pass CLI is already tied to my main account. I tried running op signout --account shorthand --forget, but that does not work. When I run op forget shorthand, it tells me to sign out first. When I try to run op signout or op signout --account shorthand, it doesn't actually sign out.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Windows 11

6 Replies

  • Sadia_A1P's avatar
    Sadia_A1P
    Icon for 1Password Team rank1Password Team

    Hi @sazquatch ,

    I'm Sadia, a Product Manager at 1Password, and have some news that may be interesting to you. I am looking for some developers and administrators that would be interested in chatting with me about a new feature our team has been working on: Service Accounts. Earlier this year, we introduced the CLI 2.0, where users can use “run” and “inject” commands to substitute secret references for secrets stored in 1Password vaults. With our new Service Account capabilities, organizations can use a separate non-user account to control and manage access to secrets without deploying additional services like Connect.

    We are currently building out service accounts and want to understand your pain-points and experiences with secrets management, and gather some feedback, so we could deliver the best product for our customers.

    If you are interested, please feel free to reach out to me at sadia.azmal@agilebits.com or sign-up for a 30 minute slot on Calendly. I look forward to hearing from you :)

  • Former Member's avatar
    Former Member

    I was able to fix this by deleting my config file.

  • Former Member's avatar
    Former Member

    Hey @sazquatch ,

    Thanks for the quick update.

    Would you be able to confirm whether or not the signin steps work for you?

    1. Sign into primary user
    2. Confirm that you are logged into primary user by calling op get user --me and checking the email or name
    3. Sign into the service account user
    4. Confirm or deny that your sign-in has not been switched to the service account user by calling op get user --me and checking the email or name
  • Former Member's avatar
    Former Member

    Would you be able to post the exact error output when trying to sign into the secondary account?

    There is no error. Just returns nothing.

  • Former Member's avatar
    Former Member

    Hey @sazquatch

    I think I may be able to offer some assistance.

    I am surprised that you are getting an error when trying to sign into your (secondary) service account while signed into the primary account. Our CLI can handle switching the "active" account by running op signin <secondaryAccount>. At first glance, it sounds like a bug and I'd like to help resolve it.

    I am having trouble replicating this issue, as I've just tried the following:

    1. Sign into primary account - op signin <primaryShorthand>
    2. Perform some op operations to confirm, such as. op get account
    3. Sign into secondary account - op signin <secondaryShorthand>
    4. Perform some op operations to confirm
    5. Sign out of secondary account via op signout --forget

    Would you be able to post the exact error output when trying to sign into the secondary account?

    Also, when you mention running commands like op signout --account shorthand --forget, is shorthand the shorthand's name? You can confirm that an account with such shorthand exists by running op signin --list to see a list of accounts you've successfully signed onto op with.