How to delete user by email id using azure SCIM api in databricks?

Aniruddhya Dutta

I need to know if there is a way to delete a user from databricks using email only using SCIM api? As of now I can see it can only delete user by ID which means I need to first retrive the ID of the user and then use it to delete.

I am using this api from powershell to delete users by email.

https://docs.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/scim/scim-users

Alex Ott

If you look into the documentation for Get Users command of SCIM Users REST API, you can see that you can specify the filtering condition for it. For example, to find specific user, you can filter on the userName attribute, like this:

GET /api/2.0/preview/scim/v2/[email protected]  HTTP/1.1
Host: <databricks-instance>
Accept: application/scim+json
Authorization: Bearer dapi48…a6138b

it will return a list of items in the Resources section, from which you can extract user ID that you can use for delete operation:

{
  "totalResults": 1,
  "startIndex": 1,
  "itemsPerPage": 1,
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "Resources": [
    {
      "id": "8679504224234906",
      "userName": "[email protected]",
      "emails": [
        {
          "type": "work",
          "value": "[email protected]",
          "primary": true
        }
      ],
      "entitlements": [
        {
          "value": "allow-cluster-create"
        },
        {
          "value": "databricks-sql-access"
        },
        {
          "value": "workspace-access"
        }
      ],
      "displayName": "User 1",
      "name": {
        "familyName": "User",
        "givenName": "1"
      },
      "externalId": "12413",
      "active": true,
      "groups": [
        {
          "display": "123",
          "type": "direct",
          "value": "13223",
          "$ref": "Groups/13223"
        }
      ]
    }
  ]
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

I'm trying to create scim integration. In Azure databricks email attribute is missing

How to log the user queries in azure databricks?

Azure AD User Provisioning with SCIM 2.0

How do I delete Azure Databricks resource group?

How do I delete Azure Databricks workspace via script

Using Local values to define Azure Databricks User block

How to check that given email is valid paypal email id or not without using Adaptive API or App ID in PHP

Azure Databricks API

Getting following error while creating a user in WSO2 IS 5.9.0 using scim API?

How to change the Spark user running jobs in Azure Databricks?

How to print user email using vehicle user_id in Laravel 5.6

How can I get a user (not the currently logged in user) by Id, name, email or other search criteria, using UserManager?

azure ad b2c custom policy - how to get user object id and email in the claim?

How can i send email to multiple email Cc ID's using php and google gmail api?

How to delete User with User ID and GID 0

How to delete post in facebook by id using php, graph API

Unable to delete a "user" from Azure B2C AD using "Issuer Assigned id"

Microsoft Azure AD graph API: How do I retrieve a user's email address?

How to add roles/group while adding a user in wso2 is 5.9.0 using scim2 apis?

How to get email Id of authenticated user?

how to display user's email instead of id

In Graph Facebook API, how can I get the user's id given users's email?

Cannot delete user in Azure B2C using Graph API

How to update existing user in Azure AD using Microsoft Graph API

How to get azure ad user properties using microsoft graph api

How to add a user to Azure DevOps using it's python client API?

How to send email notification using azure to user group when there are records in a table

How to dislplay user email id in Woocommerce Reset Password email?

How to get the email id of user company and administrator in email template in odoo