The import feature for mSecure resulted in something completely unusable, but given the state of the CSV that mSecure spits out, I’m not surprised. So here is my solution. You should probably understand some basics of RegEx before giving this a try. The end result of this is a folder with all the mSecure entries, properly named, but with the all the fields from the entry in just one secure note. This will require manually copying and pasting the relevant data into proper fields, but that’s something that can be done over time, as used. At least the data is all there.
Export CSV from mSecure
Load that CSV into decent text editor (I used VS Code)
Search Replace " with ` (single double quote character with back-tick)
Search Replace , (single comma) with ’ – ’ (space minus minus space, no quotes)
RegEx Search Replace ^([^|]+) with $1, (comma is needed, $1 is back reference, your editor may vary)
RegEx Search Replace ^ with mSecure2023, (3 commas, mSecure will become the folder name
Insert the following as first line in the file:
folder,favorite,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp
Save your changes
Import via the website as a bitwarden CSV
If you use VS Code there is a CSV plugin you can use to check everything is okay before trying to import it.
Anyway, I hope that helps somebody. It’s not elegant, but a quick and dirty solution
Thanks for the detailed instructions, those will be helpful for some of Bitwarden’s users. I was wondering though what might have changed within the mSecure format as Bitwarden has a dedicated mSecure importer.
Would you be able to provide an example file? New headers and some example entries?
If the current importer isn’t working or only supports an older format, then a bug report should be opened on Github (Web or CLI).
I’ll put it on the todo list. I’ll have to pick some suitable records and then sanitize them. In the mean time here’s an example of a more complicated record.
Globby Bank|4223457829,Login,
“Secret word 1 = first highschool security question\nSecret word 2 = PIN\nSectet word 3=”“Wallet”" password (which is a different thing because reasons)\nSecret word 4=Wallet favourite icecream\nSecret word 5=wallet name of grandmother\nwallet pin same as key card\n\n, Website|2|globbybankinternational.com,Username|7|4384932305480,Password|8|notrealpassword123,secret word 1|8|adhfuisdafhjskl,secret word 2|8|9999,
secret word 3|8|ajsdkfjkasld;fjasd;l,secret word 4|8|jfaksdl;jfdsa,secret word 5|8|asdfjsdakl;fjsdakl;
Field 1 is the entry name with some kind of ID number appended (invisible to the user), bitwarden makes this into the folder and that is extremely annoying, I ended up with 500 folders and they are not searchable.
Field 2 is the record type
Field 3 I think is favourite or not
Field 4 is notes. This password list has been back and forth between different password managers so sometimes the notes field gets a bit bloated
After that you get things like Website|2|… and Username|7|… but they are not guaranteed to be in the same order and the field name is put in with the data. Bitwarden puts all of it in the field when it imports. Hence I just put everything in the bitwarden notes field. I would have had to write a python script to parse it all and put it back together and if I was a bit more current with my Python skills I might have done it. Either way you are going to end up with a bunch of stuff in the notes field, unless the bitwarden importer has the ability to create user fields on the fly as it imports, which would be nice.
Well I guess I’ll have to figure out how to do a git bug report…
Here are the instructions as a code block so that the forum software doesn’t edit stuff out
1. Export CSV
2. Load into decent text editor (I used VS Code)
3. Search Replace " with ` (single double quote character with backtick, or whatever)
4. Search Replace , with ' -- ' (no quotes)
5. RegEx Search Replace ^([^|]+) with $1, (comma is needed, $1 is back reference)
6. RegEx Search Replace ^ with mSecure2023,,,
7. Insert the vollowing as first line in the file: folder,favorite,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp
8. Save your changes
9. Import via the website as a Bitwarden CSV
Be aware that whilst that will result in a usable import, if you use certain characters in your passwords, they will be indiscriminately replaced. I didn’t realise this until after the fact, but my main goal was to create the entries in bitwarden, I can fix up the individual passwords later if I need to.
In other words the replacement should be a word (which will be the name of the folder when they are imported into bitwarden) followed by 3 commas (because bitwarden needs 2 empty fields for everything to line up properly.
Let me know if you need more help. I was hampered by the forum software trying to be helpful and changing what I was typing.
No and it’s not likely to happen. I’m not particularly happy with BItwarden and I am considering other options. I don’t have the time to spare on a platform I’m not likely to be using much longer. The information is all there in my previous reply which includes a sanitized example of data from mSecure. I’ll won’t be responding further to replies on this thread.
Well, if any current or future users are still having trouble with Bitwarden’s mSecure importer, then the appropriate course of action has been clearly summarized in djmith85’s response above:
Unfortunately I am nothing but a stupid end user and can only follow the instructions until I am supposed to perform the RegEx Search Replace.
I have no idea what this is and even after googling it I am still to stupid to understand how to do that. All I now about Search&Replace is Strg+F and then clicking on Search&Replace instead of just search.
@andgineer Welcome to the forum, and thank you for posting this tool.
To help Bitwarden users even more, you might consider filing a Web Bug Report on Bitwarden’s GitHub repo to let them know that the official mSecure importer is not working. As requested by @djsmith85 in a comment above, providing Bitwarden with a (sanitized) example of an mSecure export file would be helpful to the devs.