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

Error while calling stored procedure for create account JSON in DB connection

Rajesh_IAM
Regular Contributor
Regular Contributor

Hello,

I am calling stored procedure with parameters in create account JSON and am passing all the values, but still I am getting syntax error. 
Rajesh_IAM_0-1713872924566.png
Create account JSON:

{
"CreateAccountQry": [
"EXEC [SVNT_LMS].[sp_UserCustomAccess_Insert]('${user.username}','${Country_Name}','${Org_Name}','${Group_Name}','${Tag_Name}')"
]
}
Here country name,org name,group name and tag name are dynamic attribute values.
Error: 

Rajesh_IAM_1-1713873433229.png

Please review and help me how to resolve this error.

 

 

9 REPLIES 9

rushikeshvartak
All-Star
All-Star
  • Does stored procedure works directly on database 
  • Does hardcoded values works from saviynt

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

@rushikeshvartak  Yes, stored procedure worked directly on database and also hardcoded values worked from saviynt.

Rajesh_IAM_1-1714398127986.png

 

Rajesh_IAM_0-1714397925312.png

{
"CreateAccountQry": [
"EXEC [SVNT_LMS].[sp_UserCustomAccess_Insert] '22253183','''Canada'',''India'',''United States''','''REMOVED_Energy-PGCO-2813'',''PG-PGGA-PGGASCM''','''AG-PG-Master-Admin'',''AG-HR-Master-Admin''','''''';"
]

Note:  If you are inserting NULL values for Custom attributes then use '''''' (triple quotes). If Groups value selected then Tags should be NULL, similarly if Tags value selected then Groups should be NULL.

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

Adding triple quotes should be managed in stored procedure


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

Hi @rushikeshvartak  I have tried with below create account JSON, but getting error while executing task.
{
"CreateAccountQry": [
"EXEC [SVNT_LMS].[sp_UserCustomAccess_Insert] '${user.username}','${Country_Name}','${Org_Name}','${Group_Name}','${Tag_Name}';"
]
}
Attached error logs for reference.

{
"CreateAccountQry": "EXEC [SVNT_LMS].[sp_UserCustomAccess_Insert] '${user.username}','${Country_Name}','${Org_Name}','${Group_Name}','${Tag_Name}';"
}


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

Hi @rushikeshvartak  Still getting error even I used above mentioned create account JSON.
below is the user request form (ARS request) along with error logs.

Rajesh_IAM_0-1714578303469.png

Attached error logs.

Which DA is causing issue ?


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

@rushikeshvartak  country name (Country_Name) was causing the issue.

Does stored Procedure accepts comma separated Country_Name 


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