Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Unable to resolve binding variable used in user creation form when trying to create users postman

supriya15
New Contributor
New Contributor

Hi Team,

We have configured user creation form and used binding variable in one of the attributes sql query.  Now we are trying to create users using Saviynt api through postman, but it is throwing sql exception error. It is not able to resolve that binding variable.

Below is the error ,

ava.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{employeeType},"|") and customproperty3=1' at line 1 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200) at com.saviynt.ecm.services.UsersService$_createUserRequest_closure53.doCall(UsersService.groovy:3125) at com.saviynt.ecm.services.UsersService.createUserRequest(UsersService.groovy:3031) at com.saviynt.ecm.ws.Restfulv5Controller$_closure108.doCall(Restfulv5Controller.groovy:12173) at grails.plugin.springsecurity.rest.RestTokenValidationFilter.processFilterChain(RestTokenValidationFilter.groovy:118) at grails.plugin.springsecurity.rest.RestTokenValidationFilter.doFilter(RestTokenValidationFilter.groovy:84) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFil

Regards,

Supriya

9 REPLIES 9

Raghu
All-Star
All-Star

@supriya15  can share sql query please


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

supriya15
New Contributor
New Contributor

Hi @Raghu ,

below is the query 

select distinct customername as ID from customer where customproperty1 like concat("|",${employeeType},"|") and customproperty3=1

Regards,

Supriya

Share postman screenshot 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Honored Contributor II
Honored Contributor II

Hi @supriya15, is this query giving result in saviynt UI .. skeptical on double quotes

supriya15
New Contributor
New Contributor

hi @NM ,

yes it gives result.

Regards,

Supriya

@supriya15 : Can you change the query as below and see if that works

select distinct customername as ID from customer where customproperty1 like concat('%|',${employeeType},'|%') and customproperty3=1

If still doesn't work can you share you post call screenshot and body you are sending 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Hi @Saathvik ,

Its not working.

Below is the ss

supriya15_0-1715854053334.png

Regards,

Supriya
[This message has been edited by moderator to mask sensitive info]

 

@supriya15 : I have updated the query in my previous comment(I forgot to add % previously). Try the new query, If still didn't can you share the sample value you are storing in customproperty1 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Share logs when you run postman in case if it does not work


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.