I have been using Bitwarden CLI for multiple years, with similar logic and process using bash at first and lately a python verson. I use cloud and self-hosted instances and I run a script to move items not associated to an organization to the organization and I also execute a full export for backup purposes. I execute for each user account in each instance. I then do an export using the Owner accunt for backup purposes.
What appears to be happening starting just today is that a simple call to list organizations comes back blank at times, specifically for the Owner account.
Command: ./bw list organizations --session $BW_SESSION
For three “standard” accounts in the organization it works flawlessly as always. For the Owner account it returns a blank Organizations list 8 times out of 10.
The generic logic in my script (a portion of it) for each account in the Organization:
- List the organizations
- Extract the Organization ID
- List the collections for the extracted Organization ID
- Move any items in the vault not associated with the Organization to the Organization using a pre-defined Collection for each account
- For the Organization Owner account, execute a ./bw sync followed by a ./bw export for backups.
I’ve been using these commands for quite a while, this is the first time I’ve seen this behavior. Any ideas?