Export/Import Active Directory as graph

I want to map out my Active Directory domain and import it into Neo4j. Does anyone have any advice on going about doing this? Do you execute a bunch of command lines to CSV? Or is there a better way? Any command or scripts would be appreciated.

Did you look at apoc load ldap?

https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/3.4/docs/loadldap.adoc

There was also a startup in germany who did something like that

1 Like

Thanks! I'll check it out!

I also made a Python script which does a import Of Active Directory2 neo4j:

Yours Kindly
Roel

I'm finally getting back to this project. I attempted the apoc.load.ldap but I'm getting hung up on the authentication step. My password contains special characters I'm not sure how to go about escaping it?

I even tried setting the credentials in the conf file but still the same error:

call apoc.load.ldap("myldap",
{searchBase : "DC=domain,dc=com",searchScope : "SCOPE_SUB"
,attributes : ["uniqueMember","cn","uid","objectClass"]
,searchFilter: "(&(objectClass=*)(uniqueMember=*))"}) yield entry
return entry.dn,  entry.uniqueMember
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure `apoc.load.ldap`: Caused by: LDAPException: Invalid Credentials (49) Invalid Credentials
LDAPException: Server Message: 80090308: LdapErr: DSID-0C090400, comment: AcceptSecurityContext error, data 52e, v1db1
LDAPException: Matched DN: