We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

DB Connector Create Account Json for SQL Server

StealthKitty
New Contributor II
New Contributor II

Hi Team,

I have configured a DB connector for SQL server with the CREATEACCOUNTJSON query below.

{
    "CreateAccountQry": [
        "CREATE LOGIN ${accountName} WITH PASSWORD = '${randomPassword}'"
    ]
}


When I try to access using JIT the account is not getting created in the DB and when I check the pending tasks I see that there is an error saying SAV - Error while creating account - [username] -Error parsing JSON

Does anyone know how to resolve?
I've tried a few queries suggested from similar discussions opened by others, but none works.  

5 REPLIES 5

Indrajeet_Patil
Saviynt Employee
Saviynt Employee

Can you please try the JSON mentioned below. 

{
"CreateAccountQry": [
"create user '${accountName}'@'%' IDENTIFIED BY '${randomPassword}'"
]
}

Indrajeet Patil

StealthKitty
New Contributor II
New Contributor II

Hi @Indrajeet_Patil ,

This query did not work for me. 
I'm getting the same error as before.

StealthKitty 

yogesh
Regular Contributor III
Regular Contributor III

I have used the below query in past and it was working for me on SQL Server:

{
	"CreateAccountQry": [
		"CREATE LOGIN [${accountName}] FROM WINDOWS WITH DEFAULT_DATABASE=[master]",
		"CREATE USER [${accountName}] FOR LOGIN [${accountName}]"
	]
}

Maybe you can try adding square brackets

StealthKitty
New Contributor II
New Contributor II

Hi @yogesh,

That query also does not work for me.
I tried another query that creates the account but when I try to launch the session, I get an error. 

 

 

StealthKitty_0-1685459626594.png

 

This is the query:

{
"CreateAccountQry": [
"CREATE LOGIN ${accountName} WITH PASSWORD = '${randomPassword}'"
]
}

 

StealthKitty
New Contributor II
New Contributor II

For some reason the server name is being updated to 1433, I am currently investigating to resolve the root cause