SSO issues with desktop app and CLI

My company is testing out turning on the option to require SSO with GSuite logins and I’ve been testing things to make sure we can still do everything we were doing before. I have had issues with getting the desktop app logged in, and I also can’t login with the CLI.

Desktop App:

When clicking the “Enterprise Single Sign-On” button it launches a browser tab that asks for the organization id, then asks to launch the Bitwarden app, and then the tab goes blank. On the Bitwarden app it goes to an endless loading spinner that never indicates success or failure.


Using both the --sso and --apikey options won’t log me in. When using the --sso option it launches a browser tab asking for organization id and after that shows this error:

Something went wrong logging into the Bitwarden CLI
You may now close this tab and return to the terminal.

In the terminal it then says “Something went wrong. Try again.”

For the --apikey option I set up the BW_CLIENTID and BW_CLIENTSECRET environment variables with the values provided by the Settings page in my browser webpage vault. When running the “bw login --apikey” command I enter my 2FA code and then it gives me an error saying “[object Object]”

I’d most like to be able to use the --apikey option with the CLI. Is there something I need to change, or are these just bugs that need to be fixed?

Desktop App Version: 1.23.0
CLI Version: 1.13.2
OS: MacOS Catalina 10.15.7
Browser: Chrome 86.0.4240.198

Looking into this now, we have been able to re-create the issue so just need to find root cause and work through a fix.

1 Like

We’ve found root cause for Desktop, fix in flight now,, looking at CLI now.

Same root cause, different code-path and fix in flight for CLI now,

This has been resolved with a release last Thu. Please let me us know if you continue to experience these issues.

The --sso option and desktop app SSO sign-in is working now, but we’re still experiencing issues with --apikey. I’ve tried on macOS, Windows, and Ubuntu and get the same [object Object] error everywhere with the force SSO option turned on.

With the force SSO option turned off I had the --apikey option working initially after updating to 1.13.3 on macOS, but now it won’t work no matter what. I can get the --apikey option to still work on other platforms with the force SSO option off however.

Thanks Thomas, we’ll be looking into this further.

I am still unable to utilize the BW CLI via API Key. I receive ‘The model state is invalid.’ error.