Skip to main content
Question

How to set SQL Server authtication using REST API?

  • January 3, 2025
  • 2 replies
  • 45 views

Forum|alt.badge.img+5

Friends,

 

I would like to set the SQL Server Authentication on client level using REST.

 

If I request the client info using `/client/:clientid`, I see within `clientProperties.pseudoClientInfo.idaInfo.sql61Prop` the override switch and the MSSQLCredentialinfo.

 

I tried simply to get the client info, update what I want to update and post this back. The response is 0, but nothing is changed.

 

Does someone knows how I can update this?

 

Thanks in advance, Maurice

2 replies

Forum|alt.badge.img+12
  • Vaulter
  • January 4, 2025

Hi ​@DUO-CSR 

Are we getting same response for all the clients?, Can we try to execute API against another client to re confirm.


Forum|alt.badge.img+5
  • Author
  • Byte
  • January 6, 2025

Hello ​@Pradeep 

Yes, I have this on all clients.

I reduced the body to only the items what needs to be changed;

$body = @"
{
"clientProperties": {
"pseudoClientInfo": {
"idaInfo": {
"sql61Prop": {
"overrideHigherLevelSettings": {
"useLocalSystemAccount": false,
"overrideGlobalAuthentication": true
},
"MSSQLCredentialinfo": {
"credentialId": 123,
"credentialName": "Cred123"
}
}
}
}
}
}
"@
$response = Invoke-RestMethod -Method Post -Body $body -Headers $headers -Uri $url + "/client/12345")

Response:

{
"processinginstructioninfo": {
"attributes": [
{
"name": "exitval",
"value": "0"
}
]
},
"response": [
{
"errorCode": 0,
"entity": {
"clientId": 12345,
"clientName": "client12345",
"_type_": 3
}
}
]
}

So successfully processed, but actually nothing is changed in the client.

 

With kind regards,

Maurice