• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

I want to load users from an LDIF file

Scheduled Pinned Locked Moved Solved
Q&A
ldap import
1
2
2.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dan
    last edited by 23 Jul 2024, 19:10

    I have an LDAP server and can export out users to an LDIF file. I want to import these users into FusionAuth. What are my options?

    --
    FusionAuth - Auth so modern you can download it.
    https://fusionauth.io

    D 1 Reply Last reply 23 Jul 2024, 19:17 Reply Quote 0
    • D
      dan @dan
      last edited by 23 Jul 2024, 19:17

      FusionAuth has a bunch of import scripts, but one that you are probably most interested in is the CSV importer, which takes a CSV file and then calls the user import API.

      Here's the link: https://github.com/FusionAuth/fusionauth-import-scripts/tree/main/csv

      Of course, LDIF is not CSV.

      Instead of using a CSV gem to get the list of users and their attributes, use a gem that can read LDIF. Here's a candidate. https://www.rubydoc.info/gems/ruby-ldap/0.9.19/LDAP%2FLDIF.parse_file but I'm not sure what the state of the art for ruby LDIF parsing is nowadays.

      If you pursue this, please submit a PR to that repo because there may be other folks who want to import users from LDIF

      An alternative would be to have them manipulate the LDIF file into CSV and import that using the csv importer. See https://www.google.com/search?client=firefox-b-1-d&q=ldif+to+csv for some examples on how to do the LDIF->CSV transformation.

      --
      FusionAuth - Auth so modern you can download it.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • D dan has marked this topic as solved on 23 Jul 2024, 19:17
      2 out of 2
      • First post
        2/2
        Last post