Export icloud keychain saved password to csv file [Solved]

alapshah
alapshah
Community Member
edited September 2019 in Mac

I have been using apple products for years and I have about 300+ passwords saved to my icloud keychain. I want to transfer them to 1Password. I tried following instructions from mrc-converter-suite but I always got error "An error has occurred. Unable to add an item to the current keychain. One or more parameters passed to a function were not valid."

Even if I enter my password 300+ times none of the passwords would get pasted in my local-icloud keychain I created as per instructions. I am not an expert in programming so I will really appreciate if I can get step by step instructions to transfer all passwords from icloud keychain to csv file.

Here are some details:

MacOS: Mojave
Version: 10.14.6 (18G95)
Safari: Version 13.0 (14608.1.49)

Please help.

Thank you.


1Password Version: 7.4.1
Extension Version: Not Provided
OS Version: 10.14.6
Sync Type: iCloud to CSV

Comments

  • MrC
    MrC
    Volunteer Moderator
    edited September 2019

    @alapshah ,

    The only method that's going to work with more recent macOS versions is the Get_Safari12_Passwords method. Please try the new Custom version I posted which under Custom here.

    Once you have downloaded the script, you can follow along with the video where I show how it works (but you'll be using the Custom one I've just updated, not the one contained in the converter suite).

  • alapshah
    alapshah
    Community Member

    @MrC

    Thank you very much. I was finally able to saved all passwords. One last thing. As per the instructions I used the macOSConvertHelper and got the 1P_import.1pif saved on my desktop. At the same time I also have a csv file which contains all my id's and passwords.

    to import in 1password should I use the csv file that was created by the apple script or should I use the .pif file. I tried the .pif file and it did not let me import and I got the error "Invalid file format. Please choose a CSV file.
    Error: Invalid file format.
    Session: Z6MWTVX4X5EEJFS5ZMS3YKPA5I
    Time: 2019-09-24 07:40:31 -04:00"

    Please let me know if the csv file would work.

    Thank you.

  • MrC
    MrC
    Volunteer Moderator
    edited September 2019

    @alapshah ,

    That sounds like progress. The Get_Safari12_Passwords will create a CSV file named pm_export.csv. This CSV file can then be converted using the csv converter in the converter suite. It will generate a final 1PIF (named pm_import.1pif), which you can import into 1Password.

    You may use the macOSConvertHelper to convert the pm_export.csv created by Get_Safari12_Passwords above. Just select the CSV converter and choose the pm_export.csv file.

    To import the 1PIF into 1Password, select the select your desired vault, and just drag the 1PIF file onto the 1Password icon on your Dock. It will then import the 1PIF into your current vault.

    I'm sorry for the circuitous process (in that the Get_Safari12_Passwords does not generate 1PIF directly). Creating a 1PIF is rather complex, and getting passwords from iCloud / Safari / Keychain has been rather problematic over the years, so I keep the Get_Safari12_Passwords code rather lean.

  • alapshah
    alapshah
    Community Member

    @MrC

    Thank you for the quick response. I did exactly as you mentioned above and I do have the 1PIF file. Its just that I am unable to import the 1PIF in 1Password and its giving me the error

    ""Invalid file format. Please choose a CSV file.
    Error: Invalid file format.
    Session: Z6MWTVX4X5EEJFS5ZMS3YKPA5I
    Time: 2019-09-24 07:40:31 -04:00"

    So I was wondering if I can actually import the csv file directly that was created using Get_Safari12_Passwords instead of using this converted 1PIF file.

  • MrC
    MrC
    Volunteer Moderator
    edited September 2019

    The CSV file was created in a particular format for use by the csv converter. You will have to alter the column order to work with 1Password as per the How to create a 1Password compatible CSV file article. The CSV file you have may contain multiple URLs in a single cell; this is supported by the csv converter, but not 1Password.

    I really want to know why you're having trouble importing the 1PIF, as I've never encountered anyone with this trouble, nor that error message about choosing a CSV file.

    Your pm_export.csv file - does it look like this? (select the file in Finder, and press the Space key)

    and your conversion using the macOSConvertHelper, did it generate output like this:

    And does the generated 1P_import.1pif, does it look like this:

    If so 1Password's File > Import > Other > Import a 1PIF File should correctly import the 1P_import.1pif file:

  • alapshah
    alapshah
    Community Member

    @MrC

    Ok so I was trying to add the 1PIF file to 1password.com website instead of 1Password web extension on safari. I installed the extension and it worked on the extension. The only problem is the vault I created on 1password.com account is not visible in 1password extension and the vault I created in extension is not visible on 1password.com. So confusing.

  • MrC
    MrC
    Volunteer Moderator

    @alapshah ,

    Can you create a new forum post regarding your vaults issues?

    Now that you have the conversion done and imported, we can close out this thread so that the Agilebits will more quickly be able to address your question (since this is a conversion thread, they tend to know I'll take care of helping, and may not notice your new issue).

  • AGAlumB
    AGAlumB
    1Password Alumni

    @alapshah: I see that you created a new discussion for that and Lars and Ben were helping you over there. If there's anything else we can assist with, just let us know. :) :+1:

  • flatbattery
    flatbattery
    Community Member

    Hello, I have tried to use the Custom Get_Safari12_Passwords method above and followed the linked video but the process gets as far as about 8 entries down the keychain before an error occurs and the process stops. The error box that appears is attached. Is anyone able to point me towards where this is failing?

  • MrC
    MrC
    Volunteer Moderator

    @flatbattery ,

    Safari 13 has a bug that prematurely fires the timer to close the passwords dialog. To avoid this bug, quit Safari, run Get_Safari12_Passwords and let it open Safari for you.

  • flatbattery
    flatbattery
    Community Member

    @MrC , thank you for replying so quickly! Now works perfectly. Thanks again.

  • MrC
    MrC
    Volunteer Moderator

    @flatbattery - Excellent.

  • dibun
    dibun
    Community Member

    I tried it on Mac OS 10.15.4 running Safari 13.1 and I get the error

  • MrC
    MrC
    Volunteer Moderator

    @dibun

    Did you follow the advice I gave to another user a few posts back?

  • dibun
    dibun
    Community Member

    Now it is working, I have to keep the mouse pointer on top of safari and then it works. Thanks

  • MrC
    MrC
    Volunteer Moderator

    Correct, you don't want to be doing other things while the script is working, @dibun .

  • dibun
    dibun
    Community Member

    Is the passwords in iCloud keychains in Keychain access is same as Safari Passwords?

  • MrC
    MrC
    Volunteer Moderator
    edited April 2020

    @dibun ,

    When you enable iCloud Keychain on your Mac (and/or iOS devices), Safari will save any passwords that you've filled in via Safari into the iCloud Keychain, so that these credentials are available across all the platforms you have.

    Keychain Access is Apple's interface to see Keychain passwords, but it is limited with what it can do for iCloud-stored Keychains. Safari can also see these passwords via its Passwords dialog in Preferences (and that's what the script pulls).

  • dibun
    dibun
    Community Member

    Thanks, Now I have imported all password to 1password. Any way to disable Keychain and enable 1password in Safari so 1password is prompted each time? My iPhone is also connected with Apple TV so can I fill Apple TV passwords via my iPhone?

  • MrC
    MrC
    Volunteer Moderator

    @dibun

    Now I have imported all password to 1password

    I love reading those words. You're welcome.

    You can disable Safari's password filling in Preferences here:

    Be sure Safari has allowed the 1Password extension:

    I use the built-in Remote on my iDevices to control / fill info on my AppleTV. Just open the Remote in the Control Center while using the AppleTV. Go to your 1Password on that device, copy the username or password that you need, and use that Remote to paste it into the text area when presented.

  • Wonks20
    Wonks20
    Community Member

    Hello,

    Unable to get this to work on MacOs Catalina 10.15.3
    Trying to export keychain passwords to 1password to import into new Samsung Galaxy S20

  • MrC
    MrC
    Volunteer Moderator

    @Wonks20 ,

    Can you give a little more detail? What have you done? What is not working?

  • Wonks20
    Wonks20
    Community Member

    @MrC
    Actually I got it to work It’s copying all the passwords from safari as I type this. I’m trying to go from an iOS to android. So im trying to take the safari passwords and export it into 1Password and try to get in into my android device is this doable?

  • MrC
    MrC
    Volunteer Moderator

    @Wonks20 ,

    When the export has completed, you’ll have a CSV file. You can use the csv converter in the converter suite to create a 1pif file, which you can import into the 1Password Desktop version. Once that is imported, your synced 1Passwords are available on all the platforms you use.

This discussion has been closed.