Change users status in account console

alesventus
Contributor

One of our users has status = Inactive in Admin setting. I tried to set it to active using rest api and the documentation but seems like api is not changing status.

I tested api and I can list users so api setting are ok.

api request:

 

import requests
import json

run_update = {
  "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ],
  "Operations": [
    {
      "op": "replace",
      "path": "active",
      "value": [
        {
          "value": "true"
        }
      ]
    }
  ]
}
headers = {"Authorization": "Bearer token"}
create_response = requests.patch(host + '/api/2.0/preview/scim/v2/Users/userid', data=json.dumps(run_update), headers=headers)

 

 

I get response 200.

Status of the user has not changed. Any advice how to set user back to active in account console?

Thanks

arpit
Databricks Employee
Databricks Employee

@alesventus Can you test the same using CLI or may be try to make the status as inactive for a dummy user? Just want to validate if the API is actually working for you or not.