Populate preferedDataLocation thru Ad Connect based on C, CO, or Country Code attributes?

%3CLINGO-SUB%20id%3D%22lingo-sub-1334187%22%20slang%3D%22en-US%22%3EPopulate%20preferedDataLocation%20thru%20Ad%20Connect%20based%20on%20C%2C%20CO%2C%20or%20Country%20Code%20attributes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1334187%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20all%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIs%20it%20possible%20to%20use%20a%20transformation%20rule%20in%20AD%20Connect%20to%20use%20the%20C%2C%20CO%2C%20or%20Country%20Code%20field%20to%20populate%20the%20preferredDatalocation%20(PDL)%20attribute%3F%26nbsp%3B%20%26nbsp%3BI%20know%20you%20can%20use%20expressions%20in%20the%20transformation%20field%2C%20but%20not%20sure%20how%20to%20transform%20these%20attributes%20(2%20letters%20or%20%23code)%20into%20the%203%20letter%20country%20code%20required%20for%20the%20PDL.%26nbsp%3B%20%26nbsp%3BYes%20ideally%20it%20should%20be%20filled%20out%20at%20account%20creation%20or%20provisioning%2C%20but%20can%20this%20be%20done%20on%20the%20backend%20with%20an%20AD%20Connect%20rule%3F%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1334187%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAD%20Connect%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eattributes%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EpreferredDataLocation%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1335812%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20preferedDataLocation%20thru%20Ad%20Connect%20based%20on%20C%2C%20CO%2C%20or%20Country%20Code%20attributes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1335812%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Vasil%2C%26nbsp%3B%20%26nbsp%3BI%20tired%20to%20convince%20them%20this%20was%20the%20right%20way%20to%20do%20it%2C%20but%20they%20do%20not%20populate%20this%20when%20accounts%20are%20provisioned%2C%20so%20they%20would%20like%20a%20rule%20to%20to%20look%20at%20another%20attribute%20(C%2C%20CO%2C%20Country%20Code)%20and%20transform%20that%20value%20into%20the%20correct%203%20letter%20code%20for%20PDL.%26nbsp%3B%20%26nbsp%3BI%20feel%20doing%20it%20at%20account%20creation%20is%20the%20way%20to%20go%2C%20but%20it%20seems%20we%20should%20be%20able%20to%20use%20an%20expression%20to%20change%20a%20value%20and%20populate%20the%20PDL.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1334852%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20preferedDataLocation%20thru%20Ad%20Connect%20based%20on%20C%2C%20CO%2C%20or%20Country%20Code%20attributes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1334852%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20simply%20use%20the%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%20color%3D%22%230b0117%22%3EmsDS-preferredDataLocation%20attribute%2C%20or%20follow%20the%20same%20procedure%20to%20configure%20a%20custom%20one%3A%26nbsp%3B%3C%2FFONT%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fhybrid%2Fhow-to-connect-sync-feature-preferreddatalocation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fhybrid%2Fhow-to-connect-sync-feature-preferreddatalocation%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1335916%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20preferedDataLocation%20thru%20Ad%20Connect%20based%20on%20C%2C%20CO%2C%20or%20Country%20Code%20attributes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1335916%22%20slang%3D%22en-US%22%3E%3CP%3ESame%20principle%20applies%2C%20you%20just%20need%20to%20adjust%20the%20%22transform%22%20part%20of%20the%20rules%20detailed%20in%20the%20article.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1335927%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20preferedDataLocation%20thru%20Ad%20Connect%20based%20on%20C%2C%20CO%2C%20or%20Country%20Code%20attributes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1335927%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3BThat's%20exactly%20what%20I%20am%20trying%20to%20figure%20out%20%3A)%3C%2Fimg%3E%26nbsp%3B%20%26nbsp%3BIt%20would%20be%20much%20easier%20in%20PowerShell%2C%20but%20trying%20to%20figure%20out%20the%20expression%20language%20to%20look%20at%20the%20attribute%20and%20transform%20it%20to%20one%20of%206%20or%207%20different%20possible%20codes%20is%20where%20I%20am%20getting%20stuck.%26nbsp%3B%20%26nbsp%3B%3A)%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Microsoft

Hey all,

 

Is it possible to use a transformation rule in AD Connect to use the C, CO, or Country Code field to populate the preferredDatalocation (PDL) attribute?   I know you can use expressions in the transformation field, but not sure how to transform these attributes (2 letters or #code) into the 3 letter country code required for the PDL.   Yes ideally it should be filled out at account creation or provisioning, but can this be done on the backend with an AD Connect rule?   

4 Replies
Highlighted

You can simply use the msDS-preferredDataLocation attribute, or follow the same procedure to configure a custom one: https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sync-feature-preferred...

Highlighted

Thanks Vasil,   I tired to convince them this was the right way to do it, but they do not populate this when accounts are provisioned, so they would like a rule to to look at another attribute (C, CO, Country Code) and transform that value into the correct 3 letter code for PDL.   I feel doing it at account creation is the way to go, but it seems we should be able to use an expression to change a value and populate the PDL.   

Highlighted

Same principle applies, you just need to adjust the "transform" part of the rules detailed in the article.

Highlighted

@Vasil Michev That's exactly what I am trying to figure out :)   It would be much easier in PowerShell, but trying to figure out the expression language to look at the attribute and transform it to one of 6 or 7 different possible codes is where I am getting stuck.   :)