User and Group Provisioning to Active Directory
How can I provisioned user to particular OU in Active Directory using C# code.?
July 2nd, 2015 6:59pm

take a look here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms698810%28v=vs.100%29.aspx

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2015 9:36pm

 ProvisionLDAPUser(mventry, "Test Active Directory", String.Concat("CN=", mventry["displayName"].Value), "OU=SomeOU,DC=test,DC=Test,DC=com" );
July 3rd, 2015 9:36am

I need connection string for using AD services ?
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2015 11:51am

This goes onto the provisioning dll.  Connection is established in the AD MA. No need for connectio
July 3rd, 2015 11:57am

Yes that's right when we are provisioning user using FIM  but How can we connect to AD from custom application, let say our requirement is to provisioned user from source(sql) to AD without using FIM by using C#, is this making sense sir ?
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2015 12:20pm

Since your post is under FIM i assumed this is related to FIM. For that you need to use accountmanager and directoryservices libraries. Plenty of examples o
July 3rd, 2015 12:23pm

Thank You sir.

Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2015 12:24pm

Create user:

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.DirectoryServices;   namespace ConsoleApplication1 { class Program { static void Main(string[] args) {   string ADFullPath = "LDAP://192.168.0.10/OU=T2,OU=root,DC=admin,DC=domain,DC=com"; DirectoryEntry ouEntry = new DirectoryEntry(ADFullPath, "admin", "passw0rd", AuthenticationTypes.Secure);   for (int i = 0; i < 1; i++) { try { DirectoryEntry childEntry = ouEntry.Children.Add("CN=TESTUSER" + i, "user"); childEntry.CommitChanges(); ouEntry.CommitChanges(); childEntry.Invoke("SetPassword", new object[] { "password22" }); childEntry.CommitChanges(); } catch (Exception ex) {   }   }   } } }

Also check this: http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C

July 3rd, 2015 12:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics