Skip to main content
Question

How to set SQL Server authtication using REST API?


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+11
  • Vaulter
  • 235 replies
  • 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
  • 22 replies
  • 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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings