We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description
When calling the service_principals.get() with a valid service principal id the request failed with the following error
Traceback (most recent call last): File "/home/test/app/hello.py", line 23, in <module> main() File "/home/test/app/hello.py", line 18, in main details = client.service_principals.get(service_principal.id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/test/app/.venv/lib/python3.12/site-packages/databricks/sdk/service/iam.py", line 2792, in get res = self._api.do('GET', f'/api/2.0/preview/scim/v2/ServicePrincipals/{id}', headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/test/app/.venv/lib/python3.12/site-packages/databricks/sdk/core.py", line 157, in do response = retryable(self._perform)(method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/test/app/.venv/lib/python3.12/site-packages/databricks/sdk/retries.py", line 54, in wrapper raise err File "/home/test/app/.venv/lib/python3.12/site-packages/databricks/sdk/retries.py", line 33, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/test/app/.venv/lib/python3.12/site-packages/databricks/sdk/core.py", line 247, in _perform raise error from None databricks.sdk.errors.platform.PermissionDenied: unable to parse response. This is likely a bug in the Databricks SDK for Python or the underlying API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:```GET /api/2.0/preview/scim/v2/ServicePrincipals/6671074037673577 > * User-Agent: unknown/0.0.0 databricks-sdk-py/0.32.2 python/3.12.6 os/darwin auth/pat > * Accept-Encoding: gzip, deflate > * Accept: application/json > * Connection: keep-alive > * Authorization: Bearer REDACTED_TOKEN < 403 Forbidden < https://<<READACTED>>.cloud.databricks.com/api/2.0/preview/scim/v2/ServicePrincipals/6671074037673577 is only accessible by admins.```
Reproduction A minimal code sample demonstrating the bug.
import json from databricks.sdk import WorkspaceClient def main(): host = "<<databricks host>>" token = "<<token>>" client = WorkspaceClient(host=host, token=token) id = client.service_principals.list()[0].id details = client.service_principals.get(id) print(json.dumps(details.as_dict())) if __name__ == "__main__": main()
Expected behavior
Is it a regression? Did this work in a previous version of the SDK? If so, which versions did you try? No
Other Information
The text was updated successfully, but these errors were encountered:
The url pointed by the error message should point to this library and not the golang version of the same
Have fixed the above expected behavior in PR #767
Sorry, something went wrong.
@kishaningithub please revoke the bearer token you've included in the issue description and remove it from the description when done.
Done @mgyucht Thanks for the callout
dsculptor
No branches or pull requests
Description
When calling the service_principals.get() with a valid service principal id the request failed with the following error
Reproduction
A minimal code sample demonstrating the bug.
Expected behavior
Is it a regression?
Did this work in a previous version of the SDK? If so, which versions did you try?
No
Other Information
The text was updated successfully, but these errors were encountered: