Sync from SQL DB to Active Directory
Hi, I'm new to FIM and did not use previous versions as well. I need to sync some fields of the AD users from the HR SQL database. I'm following the "Introduction to Publishing To Active Directory from Two Authoritative Data Sources" guide (http://technet.microsoft.com/en-us/library/ee534908(WS.10).aspx). I have created the MAs and come to the point where I need to create Sync Rules from FIM portal. When creating the inbound rule, in Relationship tab, I'm trying to match "employeeID" from MV with the "userID" from the SQL table. Naturally, the "userID" is an integer type column but employeeID seems to need a string. It gives an error that the types do not match. Is there anyway to solve this? Thanks
November 3rd, 2010 11:16am

Create a new MV attribute called userID that's a Number/integer field and use that instead. You can do this in the Metaverse Designer section of the Sync Service UI.My Book - Active Directory, 4th Edition My Blog - www.briandesmond.com
Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2010 11:30am

Hi Brian, Thanks for the answer. I think it will be better to expand the aim of the project as I will need more help. My actual purpose in this project is to sync AD users fields and memberships with the info from SQL DB. There will be no deletion or creation, just update on existing matches. I need to look at the SQL table which reflects some fields like Name, Postal Code, Phone, etc.. and update the AD fields accordingly. Also this SQL table will hold branch codes for users and I will add the users to some AD Distribution groups according to those codes (for exampe a user with a branch code of "ITSQL", the user must be added to "SQL Team" distrbution group in AD). And this will be done every night, not during midday. The Sync jobs will start at night, so I guess I don't need MPRs to trigger the jobs when something is updated in SQL side, just schedule the sync jobs. I have found another document that describes what I'm trying to do but with MIIS 2003. (http://download.microsoft.com/download/1/3/7/137d2f75-f95c-4aea-b553-a311203058cc/Synchronizing%20SQL%20Server%20Objects%20to%20Active%20Directory.doc) I suppose this document also applies to FIM2010. I have followed it to the part where it codes a provsioning method: Try Dim connectedMA As ConnectedMA connectedMA = mventry.ConnectedMAs("MyADMA") If connectedMA.Connectors.Count < 1 Then Dim myContainer As String myContainer = "OU=MIISObjects,DC=fabrikam,DC=com" Dim myRDN As String myRDN = "CN=" & mventry("samAccountName").Value Dim myDN As ReferenceValue myDN = connectedMA.EscapeDNComponent(myRDN).Concat(myContainer) Dim csEntry As CSEntry If (mventry.ObjectType.Equals("ADUser")) Then csEntry = connectedMA.Connectors.StartNewConnector("user") Else csEntry = connectedMA.Connectors.StartNewConnector("group") End If csEntry.DN = myDN csEntry.CommitNewConnector() End If Catch myEx As Exception Throw myEx End Try I did not actually understand what this code meant to do? Is it defining a Sync Rule which we can do from FIM portal? I'm stuck here. I can just copy/paste the code but I will need to develop it further, so if this can be done from a GUI view, it will be easier for me. Also the document for MIIS to sync SQL with AD seems much easier to do than the FIM document. For example in FIM document, it creates 3 MAs but in MIIS document, it creates only 2 which does the job. Also in FIM, it's said to create Sync Rules, MPRs, etc.. but in MIIS doc there is no need for these (I don't know if all of these are handled in that piece of code). What is the best practice for this? Thanks
November 4th, 2010 4:29am

Batuhan, you are better off starting with the following walkthroughs: Introduction to Inbound Synchronization Introduction to Outbound Synchronization These documents will help you to get a basic understanding of how synchronization works. After you have successfully completed the scenarios in these documents, you can replace the File management agent with a SQL management agent. Replacing a management agent doesn't make a huge difference, however, for someone that is new to FIM, it is advisable to get a basic understanding of the synchronization process works. The walkthrough scenarios are complemented by Understanding Data Synchronization with External Systems, which gives you the conceptual background information about the synchronization process. Cheers, MarkusMarkus Vilcinskas, Knowledge Engineer, Microsoft Corporation
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2010 6:55am

Thanks for the resources Markus, I'm already using them. I'm trying to figure how this all works but as I mentioned above different docs direct me in different paths. MIIS doc is much simpler than the FIM docs. So far I managed to import the data from SQL to FIM but I could not from FIM to AD possibly because I don't have any sync rules and I did not use the code piece above. So can you simply tell me what does the above code piece do? Also I have a demo VHD of FIM 2010 RC1 that I downloaded a few months ago, I would like to look into it but I don't have the password for it, if you remember it by chance, can you tell it too? Thanks for your help.
November 4th, 2010 8:17am

Hi- The MIIS really doesn't apply here. The code you pasted will continue to work in FIM however the sync rule functionality replaces this code. The code you pasted creates a new user or group in the MIISObjects OU in the Fabrikam.com domain. This is fuctionally equivelant to checking the box in a FIM Outbound Sync Rule to Create a Resource in the External System.My Book - Active Directory, 4th Edition My Blog - www.briandesmond.com
Free Windows Admin Tool Kit Click here and download it now
November 5th, 2010 1:02pm

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

Other recent topics Other recent topics