You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK is using an outdated preview endpoint for groups management, which does not work with the new public preview feature that allows us to specify group managers who are not workspace admins but who do have access to manage groups.
/api/2.0/accounts/{account_id}/scim/v2/Groups for account admins
and
/api/2.0/account/scim/v2/Groups for workspace admins
Reproduction
the following works to update groups:
classGroupsAPI(databricks.sdk.service.iam.GroupsAPI):
defpatch(self,
id: str,
*,
operations=None,
schemas=None):
body= {}
ifoperationsisnotNone: body['Operations'] = [v.as_dict() forvinoperations]
ifschemasisnotNone: body['schemas'] = [v.valueforvinschemas]
headers= {'Accept': 'application/json', 'Content-Type': 'application/json', }
# this is the only change, I updated the api endpointself._api.do('PATCH', f'/api/2.0/account/scim/v2/Groups/{id}', body=body, headers=headers)
groups_api=GroupsAPI(workspace_client.api_client)
groups_api.patch(
id=group_id,
operations=[
databricks.sdk.service.iam.Patch(
op=databricks.sdk.service.iam.PatchOp.ADD,
value=json.dumps({
"members": [
{
"value": user_id
}
]
})
),
]
)
Expected behavior
A clear and concise description of what you expected to happen.
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here.
Other Information
OS: [e.g. macOS]
Version: [e.g. 0.1.0]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Description
The SDK is using an outdated preview endpoint for groups management, which does not work with the new public preview feature that allows us to specify group managers who are not workspace admins but who do have access to manage groups.
the SDK uses the URL
/api/2.0/preview/scim/v2/Groups/
while the correct path should be, according to https://docs.databricks.com/api/account/accountgroups/patch
/api/2.0/accounts/{account_id}/scim/v2/Groups for account admins
and
/api/2.0/account/scim/v2/Groups for workspace admins
Reproduction
the following works to update groups:
Expected behavior
A clear and concise description of what you expected to happen.
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding
logging.basicConfig(level=logging.DEBUG)
to your program, and include the logs here.Other Information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: