ODM AD Advanced Mappings

I was wondering if someone can give me some examples of advanced mappings in Directory Sync (On Demand AD). I have come from an AD Sync Pro back ground and although I have been through the ODM AD Course etc I am having a hard job translating how I used to do these formulas.

I am looking to change the UPN format from firstname@domain  to firstname.lastname@domain. In AD Pro I would have completed the following for example -

CASE WHEN EntryType=”Contact” THEN

              CASE WHEN Firstname is NULL OR LastName is Null THEN

                            dbo.ReplaceDomain(P.UserPrincipalName,P.TargetDomain)

              ELSE

                             LTRIM(RTRIM(FirstName + “.” + LastName+”@”))

              END

ELSE

              CASE WHEN EntryType='Contact' THEN

                            dbo.ReplaceDomain(P.InternetAddress,P.TargetDomain)

              ELSE

                            dbo.ReplaceDomain(P.UserPrincipalName,P.TargetDomain)

              END

END

I have gone through the Advanced Mapping Guide but still struggling to translate this into VALUE and CONDITION etc. I think once I can see this one displayed in the ODM AD Format then it will click and I will be able to translate any other formulas I used to use.

Parents
  • Hello Richard, 

    The following is what I have tested for advanced mapping in my support lab and was able to update the UPN to be firstname.lastname.  I used trim function in mine as I have a few objects which contain spaces in the last name. 

    S.givenName + "." +trim(S.sn) + "@" + Profile.TargetDomain

    I would test this in a pilot with multiple users to ensure you are getting the desired outcome. 

    Doug Rain

    Technical Product Specialist

    Quest | Software Group

    Douglas.rain@quest.com

    Office +1 800.306.9329

  • Thanks Doug thats really helpful.

    The issue with that is I actually need to trim the givenName unfortunately as the source AD has first name and middle name in the givenName attribute separated by a space. for example

    givenName = Joe John

    sn = bloggs

    I need to keep everything to the left of the space in the givenName field so that it syncs as joe.bloggs@bluefishhotels.com

  • The following is what I have working in my lab that is trimming the givenName and only taking the first name. 

    If(contains(s.givenName, " "), left(S.givenName, index(S.givenName, " ") - 0) + "." +trim(S.sn) + "@" + Profile.TargetDomain, S.givenName + "." +trim(S.sn) + "@" + Profile.TargetDomain)  

    I would run this against a group of test users to confirm this works as expected in your environment. 

    Doug Rain

    Technical Product Specialist

    Quest | Software Group

    Douglas.rain@quest.com

    Office +1 800.306.9329

Reply
  • The following is what I have working in my lab that is trimming the givenName and only taking the first name. 

    If(contains(s.givenName, " "), left(S.givenName, index(S.givenName, " ") - 0) + "." +trim(S.sn) + "@" + Profile.TargetDomain, S.givenName + "." +trim(S.sn) + "@" + Profile.TargetDomain)  

    I would run this against a group of test users to confirm this works as expected in your environment. 

    Doug Rain

    Technical Product Specialist

    Quest | Software Group

    Douglas.rain@quest.com

    Office +1 800.306.9329

Children
No Data