Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Patch Operation on a group is removing all the users and groups #5

Closed
de-jaina opened this issue Jul 19, 2023 · 5 comments
Closed

Comments

@de-jaina
Copy link

de-jaina commented Jul 19, 2023

Description:

I was trying to use the patch_dbgroup method to patch the Databricks group from the Active directory, but it is removing all the members from that group instead of removing the selected members.

To Replicate:

  1. Create a group in AAD.
  2. Add 2 members in the group in AAD.
  3. Execute the code. It will sync the Group and the members from AAD to Databricks Account.
  4. Remove one member from the group in AAD.
  5. Execute the code again to sync, but this time the group get empty. All the members from the group are getting removed.

What I tried:

I tried changing the schema to urn:ietf:params:scim:api:messages:2.0:PatchOp by referring databricks api doc for Azure, but it still does not work.

Also, I found one documentation from databricks that states: Group membership cannot be updated through PATCH/PUT requests.

### Other Issue:
There is a minor issue in the databricks_client.py file:
obj["value"] = member["value"]
UnboundLocalError: local variable 'obj' referenced before assignment

obj = dict() is missing at line no. 131.

@mick2004 , @AbhiDatabricks

@mick2004
Copy link
Owner

Thanks @de-jaina I will have a look on this coming weekend.Feel free to open a pr if you wish .

@mick2004
Copy link
Owner

mick2004 commented Aug 4, 2023

@all-contributors please add @jaina15 for test

@allcontributors
Copy link
Contributor

@mick2004

I've put up a pull request to add @jaina15! 🎉

@mick2004
Copy link
Owner

mick2004 commented Aug 4, 2023

@all-contributors please add @jaina15 for test

Repository owner deleted a comment from allcontributors bot Aug 4, 2023
@mick2004
Copy link
Owner

mick2004 commented Sep 8, 2023

Fixed as part of 0826ba8 . new release 0.1.4 released

@mick2004 mick2004 closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants