none
Help on FIM DLL RRS feed

  • Question

  • I'm new to use deving dll's for FIM and need some Advice on mapping for Joins and resolving for joins

    So the scenario is as follows. I have and external cdn (database) and i am trying to do a join on the username in the DB and the MVentry("accountName") problem for me is that the username in the cdn (database) is prefixed with "domain\" example. username comes into the connector space as "us\username" (there are some exceptions where the cdn username can directly map to the ad username and those join fine using code below)

    The DLL code i have is as follows.. but currently doe not resolve and make joins. 

    Public Sub MapAttributesForJoin(ByVal FlowRuleName As String, ByVal csentry As CSEntry, ByRef values As ValueCollection) Implements IMASynchronization.MapAttributesForJoin
            ' TODO: Add join mapping code here
            Select Case FlowRuleName

                Case "ADUSERNAME"
                    Dim IBSUserName As String = csentry("ADUSERNAME").Value
                    Dim Username As String = csentry("ADUSERNAME").Value.Remove(0, 3)
                    Dim Domain As String = csentry("ADUSERNAME").Value.Substring(0, 2)
                    values.Add(IBSUserName)
                    values.Add(Username)
                    values.Add(Domain)

                Case Else

                    Throw New EntryPointNotImplementedException()

            End Select

        End Sub

        Public Function ResolveJoinSearch(ByVal joinCriteriaName As String, ByVal csentry As CSEntry, ByVal rgmventry() As MVEntry, ByRef imventry As Integer, ByRef MVObjectType As String) As Boolean Implements IMASynchronization.ResolveJoinSearch
            ' TODO: Add join resolution code here


            ResolveJoinSearch = False
            imventry = -1

            Dim mventry As MVEntry
            Dim index As Int32

            index = 0


            Select Case joinCriteriaName

                Case "cd.person#3"

                    For Each mventry In rgmventry
                        
                        If mventry("accountName").Value = csentry("ADUSERNAME").Value.Remove(0, 3) AndAlso mventry("Domain").Value = csentry("ADUSERNAME").Value.Substring(0, 2) Then
                            ResolveJoinSearch = True
                            imventry = index
                            Exit Function
                        End If
                        index = index + 1
                    Next

                Case Else


                    Throw New EntryPointNotImplementedException()

            End Select

        End Function

    Monday, March 11, 2013 11:50 AM

Answers

  • I would update your code to first check if there is a '\' within the username (you can use String.IndexOf("\"), if so strip this from the username and add it to the list.

    It does not make sense to provide additional values while there is not 'slash' in the username, this can potentially lead to incorrect joins.

    Furthermore you can use the preview button to see if your join rules mathes to mv objects and see if the resolve is necessary



    Need realtime FIM synchronization and advanced reporting? check out the new http://www.imsequencer.com that supports FIM 2010, Omada Identity Manager, SQL, File, AD or Powershell real time synchronization!

    • Marked as answer by aelric Tuesday, April 2, 2013 12:50 PM
    Monday, March 11, 2013 12:09 PM

All replies

  • I would update your code to first check if there is a '\' within the username (you can use String.IndexOf("\"), if so strip this from the username and add it to the list.

    It does not make sense to provide additional values while there is not 'slash' in the username, this can potentially lead to incorrect joins.

    Furthermore you can use the preview button to see if your join rules mathes to mv objects and see if the resolve is necessary



    Need realtime FIM synchronization and advanced reporting? check out the new http://www.imsequencer.com that supports FIM 2010, Omada Identity Manager, SQL, File, AD or Powershell real time synchronization!

    • Marked as answer by aelric Tuesday, April 2, 2013 12:50 PM
    Monday, March 11, 2013 12:09 PM
  • Hi Paul thanks for the response

    the username in the database will have a "\" in it as the format is used is domain\username (i.e. us\username)

    Unfortunately i have to do a resolve as the database cdn holds usernames for user in multiple domains. some users in different domain may have the same username. Hence my resolve code 

    If mventry("accountName").Value = csentry("ADUSERNAME").Value.Remove(0, 3) AndAlso mventry("Domain").Value = csentry("ADUSERNAME").Value.Substring(0, 2) Then
                            ResolveJoinSearch = True

    what i am trying to do strip the first 3 characters from the db username

    csentry("ADUSERNAME").Value.Remove(0, 3)

    then check if the result is equal to the MVEntry("accountName") 

    I also check if the first to characters in the db username csentry("ADUSERNAME").Value.Substring(0, 2) is equal to the mventry("domain")  that should join the correct database user to the correct portal user.

    Monday, March 11, 2013 12:23 PM