How to get list of every vault entry with disabled autofill?

For Autofill login to fail on *certain* pages, whereas manual input doesn't. · Issue #4697 · bitwarden/clients · GitHub, I’d like to add all of the accounts that aren’t working with auto-fill. Consequently, I’d like to be able to see every vault item of mine that has autofill disabled. Since I can’t sort entries via attribute in the GUIs of any of the clients (unfortunately - where’s the feature request for that?) how can I accomplish that via the CLI?

I’m competent at PowerShell and python3, and passable at sh/bash, but I don’t mind what you use. Heck, if I actually can get it from the GUI, that’d be even better.

Thanks.

1 Like

Your linked Github issue seems to describe an edge case in which auto-fill fails for certain websites. I don’t think the Bitwarden vault contains any attributes that track whether or not the stored login items are affected by a bug that you had reported 6 months ago.

Why mention that? Obviously that would be absurd.

Did you only read the linked bug? I never asked for that. I asked for a way to get the “do not auto-fill on page load” attribute, @grb:

image

TBC Not an answer.
I can see an item for “autofillOnPageLoad” in the data.json file that the CLI downloads (so this data is part of the vault) but I can’t find syntax to reveal it so I can create a report.
I tried “list items” and “get item” :cry:
If I was sufficiently motivated I would create a report off the data.json file.

1 Like

I’m sorry, I did not get that from your post at all.

As @DoctorB has indicated, there is a property named autofillOnPageLoad that you could use. You probably are better at PowerShell than I, so I would suggest following some of the strategies used in the thread on chronological sorting using the CLI, and applying those methods to filter by the value of autofillOnPageLoad.

1 Like

Thanks lots, @grb and @DoctorB. How did you find the autofillOnPageLoad attribute?

bw get item a9c27605-e3e5-4a34-99bc-adc501676b13 | ConvertFrom-JSON | Select-String 'autofillOnPageLoad'

nor

bw get item a9c27605-e3e5-4a34-99bc-adc501676b13 | ConvertFrom-JSON | Select-Object -ExpandProperty "$key"

hasn’t quite worked, and the recursion outlined at

is a little much for me.

Just open your data.json file (or a JSON export of your vault) and have a look at the data structure.

1 Like

Why are you using bw get item instead of bw list?

I don’t have CLI installed, and I know very little PowerShell, so I can’t debug this for you, but I would think you should only need minor revisions to the following expression (from this post in the sorting thread):

(.\bw list items | ConvertFrom-Json) | Where-Object { $_.type -eq 1 } | Select-Object -ExpandProperty login -Property name | Where-Object { $null -ne $_.passwordRevisionDate } | Sort-Object -Property passwordRevisionDate | Select-Object -Property name, passwordRevisionDate

Perhaps something like the following (this is me improvising, no guarantees that this will work as is):

(.\bw list items | ConvertFrom-Json) | Where-Object { $_.type -eq 1 } | Select-Object -ExpandProperty login -Property name | Where-Object {$_.autofillOnPageLoad -eq 1 } |  Select-Object -Property name, autofillOnPageLoad

Just to check the extraction code from one before trying it with recursion, @grb.


Using recursion on a local archive, (because because I’m lazy, I started on the local vault)

(Get-Content -LiteralPath "$HOME/.var/app/com.bitwarden.desktop/config/Bitwarden/data.json" | ConvertFrom-JSON) | Select-Object -ExpandProperty 37515fbb-ce2a-4342-9680-acaf00055b94 | Select-Object -ExpandProperty data | Select-Object -ExpandProperty ciphers | Select-Object -ExpandProperty encrypted | Where-Object { $_.type -eq 1 } | Select-Object -ExpandProperty login -Property name | Where-Object { $null -ne $_.passwordRevisionDate } | Sort-Object -Property passwordRevisionDate | Select-Object -Property name, autofillOnPageLoad

fails at

Where-Object { $_.type -eq 1 }

and although Bitwarden Web vault although creates a more easily consumable vault (because, because I’m lazy I didn’t want to use https://www.reddit.com/r/Bitwarden/comments/y66i1n/how_to_decrypt_json_encrypted_export_password/?utm_source=share&utm_medium=web2x&context=3)

(Get-Content -LiteralPath "$HOME/Downloads/bitwarden_export_20230818021151.json" | ConvertFrom-Json) | Select-Object -ExpandProperty items | Where-Object { $_.type -eq 1 } | Select-Object -ExpandProperty login -Property name | Where-Object { $null -ne $_.passwordRevisionDate } | Sort-Object -Property passwordRevisionDate | Select-Object -Property name, autofillOnPageLoad

fails at

$null -ne $_.passwordRevisionDate

so I’m definitely not superior to you at PowerShell, but this is a good start point that I’ll try my best to get a result out of. Thanks lots again.

This part is intended to select login items only (and exclude secure notes, credit cards, etc.).

@Bill_Morgan is undoubtedly a stronger PS programmer than both of us, so you may want to use his script as a starting point for further experimenting.

Good luck, and let is know how it goes.

1 Like