Error 404 when trying to export org vault using cli

Was wondering if anybody got across the same issue that you get a 404 error when trying to export an organization vault.

Steps To Reproduce

  1. Using the bw cli (in my case installed using npm), signed into my selfhosted bitwarden server

bw config server <serverurl> bw login --apikey bw sync bw unlock

  1. List my organizations in order to get organization IDs

bw list organizations --session <BW_SESSION_KEY>

  1. Try to export one of my organizations’ vault as a non-encrypted json

bw export --format json --organizationid <orgid> --session <BW_SESSION_KEY> --output .

Expected Result

A json formatted file with the items in my organization vault

Actual Result

Getting the following error code:

{“response”:{“error”:{“code”:404,“reason”:“Not Found”,“description”:“The requested resource could not be found.”}},“captchaRequired”:false,“statusCode”:404}

Screenshots or Videos

Screenshot 2022-09-22 at 19 43 59

Additional Context

I’ve triple checked that the org id is correct. Additionally, other commands such as

bw get organization <orgid>
bw list org-collections --organizationid <orgid>

do work with the same org id that I’m using on the export command.

Exporting using other formats (csv or encrypted json) come with the same result.

Exporting the organization vault using the web client works as expected.

I logged everything here in this github issue: Export organization vault gives error 404 resource not found · Issue #3595 · bitwarden/clients · GitHub

Hello @Timo_Verbrugghe - welcome to the Bitwarden community.

It would be helpful to other readers if you could at least copy and paste your issue into this forum, rather than making people go back and forth. But I had a look and will take a stab at it. What happens if you drop the last part of the command that reads --output . ? If you aren’t specifying a folder with the --output parameter, it defaults the the current working directly already, so that part is (at least) unnecessary.

Otherwise, it looks fine to me, and perhaps it is related to some sort of network issue? Trying a different network connection (e.g., a VPN) might be worth trying to see if that’s the cause.

Let us know how you make out.

You’re right, have pasted the issue in the first post here.

Removing --output gives me the same response.

Thought that it might be a network issue as well, but other commands that also use the organization id, such as f.e. bw get organization <orgid> or bw list org-collections --organizationid <orgid> does give a correct response. So don’t think that it has to do with network :s.

Yeah, something very odd is happening.

Do you get a result if you enter:
bw list items --organizationid <id>

Doing that command gives the expected output (aka the items in in the organization in json format is given back)…

Ok, I just realized the issue after re-reading your original post. You aren’t using Bitwarden as your server. You are running vaultwarden. Why didn’t you identify that right from the start?

So, this is definitely a server-side error. Since you aren’t using Bitwarden for your server, you should be reaching out to vaultwarden support instead.

This is a direct quote from the developer of vaultwarden:

This project is not associated with the Bitwarden project nor 8bit Solutions LLC.

:warning:IMPORTANT :warning:: When using this server, please report any bugs or suggestions to us directly (look at the bottom of this page for ways to get in touch), regardless of whatever clients you are using (mobile, desktop, browser…). DO NOT use the official support channels.

More info can be found here .

Closing this thread since it is not related to a Bitwarden product.