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
Fix OIDC endpoints detection in Databricks M2M (#1255)
## What changes are proposed in this pull request?
Fix `oidc_endpoints` property to correctly separate Databricks and Azure
OIDC endpoints.
## Problem
The `oidc_endpoints` property was incorrectly returning Azure OIDC
endpoints when `ARM_CLIENT_ID`
was set, even for Databricks OAuth flows (like `oauth-m2m`) that don't
use Azure authentication.
This caused Databricks M2M OAuth to fail when users set `ARM_CLIENT_ID`
for other purposes.
## Solution
1. **Created `databricks_oidc_endpoints` property**: Clean method that
returns only Databricks
OIDC endpoints, without any Azure logic
2. **Deprecated `oidc_endpoints` property**: Kept for backward
compatibility with clear
deprecation warning in docstring
3. **Updated all Databricks OAuth flows** to use
`databricks_oidc_endpoints`:
- `oauth_service_principal` (oauth-m2m)
- `oidc_credentials_provider`
- `_oidc_credentials_provider`
- `external_browser`
- `OAuthClient`
4. **Updated Azure-specific flows** to explicitly use
`get_azure_entra_id_workspace_endpoints`:
- `external_browser` (when using `azure_client_id`)
- `github_oidc_azure`
## Tests
- **Integration tests** (4 new): Tests for OAuth M2M and Azure Client
Secret auth for both
workspace and account clients
- **Unit tests** (6 new): Comprehensive coverage including the key bug
scenario where
`databricks_oidc_endpoints` correctly ignores `azure_client_id`
## How is this tested?
Run unit tests and integration tests with appropriate environment
variables set.
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: NEXT_CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
9
9
### Bug Fixes
10
10
11
+
* Fixed Databricks M2M OAuth to correctly use Databricks OIDC endpoints instead of incorrectly using Azure endpoints when `ARM_CLIENT_ID` is set. Added new `databricks_oidc_endpoints` property that returns only Databricks OIDC endpoints, and updated all Databricks OAuth flows to use it. The old `oidc_endpoints` property is deprecated but maintained for backward compatibility.
0 commit comments