Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to pass $ in a string to AD Target system

KTaggart
New Contributor III
New Contributor III

I am trying to set the value of HomeDirectory in AD in the create account JSON, if I map like this, value is able to get set 

"HomeDirectory":"\\\\cntr\\workstationsdfs\\RedirectedFolders\\${user.username}

however after RedirectedFolders, there is a business need to add $.

$ is an escape character, so I have tried to pass value like this  \\\\cntr\\workstationsdfs\\RedirectedFolders\$5\\${user.username}

however I get error 

Error while creating account in AD - [LDAP: error code 19 - 00002082: AtrErr: DSID-03151F1B, #7: 0: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 2a (givenName):len 232 1: 000020B5: DSID-0315344E, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 15000a (manager) 2: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 20092 (company):len 202 3: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 90023 (employeeID):len 36 4: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 14 (telephoneNumber):len 172 5: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 2008d (department):len 190 6: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 160022 (middleName):len 166 ]

If I remove HomeDirectory from the createAccount JSON, and run provisioning operation on same account, then it works, please assist.

8 REPLIES 8

rushikeshvartak
All-Star
All-Star

"HomeDirectory": "\\\\cntr\\workstationsdfs\\RedirectedFolders\\$5\\${user.username}"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello @rushikeshvartak ,

Thanks for the suggestion.  I tried that on one user, and still got error as shown below

Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript8228.groovy: 15: illegal string body character after dollar sign; solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 15, column 71. tionsdfs\\RedirectedFolders\\$5\\${user. ^ 1 error

"HomeDirectory": "\\\\cntr\\workstationsdfs\\RedirectedFolders\\\$5\\${user.username}"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello @rushikeshvartak 

With your latest value, I get same error when I am using " \\\\cntr\\workstationsdfs\\RedirectedFolders\$5\\${user.username}"

Error while creating account in AD - [LDAP: error code 19 - 00002082: AtrErr: DSID-03151F1B, #7: 0: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 2a (givenName):len 232 1: 000020B5: DSID-0315344E, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 15000a (manager) 2: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 20092 (company):len 202 3: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 90023 (employeeID):len 36 4: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 14 (telephoneNumber):len 172 5: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 2008d (department):len 190 6: 00002082: DSID-03151F1B, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 160022 (middleName):len 166 ]

 

But If I remove HomeDirectory mapping, then create user works fine.

 

$ is used internally for evaluation hence its causing issue


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello @rushikeshvartak 

With that being said, is there no way to provision any attribute to Active Directory that contains a "$" in the string value?  Seems we are not able to pass this in the create JSON, and I also have not seen any way to configure anything like a post user create powershell action script either, please share thoughts.

 

Thanks,

Kyle 

pruthvi_t
Saviynt Employee
Saviynt Employee

Hi @KTaggart ,

usually in json if you would like to escape special character like $ we use backslash \ to escape it(\$). In this case since we're using it to represent in file directory attribute in json, can you please try with below param once,

"HomeDirectory": "\\\\cntr\\workstationsdfs\\RedirectedFolders\\\\$5\\${user.username}"

Or you can try using below attribute if using backslash is not working in this case as we're passing file directory path. \u00245 is unicode sequence value for $ symbol.

"HomeDirectory": "\\\\cntr\\workstationsdfs\\RedirectedFolders\u00245\\${user.username}"

Thanks,


Regards,
Pruthvi

KTaggart
New Contributor III
New Contributor III

Hello @pruthvi_t 

Thanks for the suggestions.  I have tried both of your suggestions, and both have failed, attaching relevant section of log for both provisioning operations below.

 

Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript10429.groovy: 15: illegal string body character after dollar sign; solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 15, column 73. onsdfs\\RedirectedFolders\\\\$5\\${user. ^ 1 error

 

 

 

Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript10443.groovy: 15: illegal string body character after dollar sign; solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 15, column 74. nsdfs\\RedirectedFolders\u00245\\${user. ^ 1 error