venkatcrc
New Contributor III

We use Token generated in Account console to make REST API calls. you can try this work around if your use case allows to use token instead of userid/password.

Below is an example in python.

  user_json = {

  "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ],

  "userName": f"{username}",

  "name": {'familyName': f'{last_name}', 'givenName': f'{first_name}'}

  }

  headers = { "Authorization": f"Bearer {token}"}

  url = 'https://accounts.cloud.databricks.com/api/2.0/accounts/<account_id>/scim/v2/Users'

  result = requests.post(url, headers=headers, data=json.dumps(user_json))

View solution in original post