Package com.databricks.jdbc.auth

## Class AzureMSICredentials

- java.lang.Object
- - com.databricks.jdbc.auth.AzureMSICredentials

All Implemented Interfaces:
  `com.databricks.sdk.core.oauth.TokenSource`

    public class AzureMSICredentials
    extends Object
    implements com.databricks.sdk.core.oauth.TokenSource

Provides authentication functionality using Azure Managed Service Identity (MSI).

This class implements TokenSource to handle token retrieval and refreshing for Databricks services running on Azure. It leverages the Azure Instance Metadata Service to obtain OAuth tokens that can be used to authenticate with Databricks and Azure Management endpoints.

The class supports both user-assigned and system-assigned managed identities. For user-assigned managed identities, a client ID should be provided.

### Method Summary

All Methods Instance Methods Concrete Methods
`com.databricks.sdk.core.oauth.Token` `getManagementEndpointToken()` Retrieves a token for accessing the Azure Management endpoint.
`com.databricks.sdk.core.oauth.Token` `getToken()` Retrieves the Databricks access token.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getToken

    public com.databricks.sdk.core.oauth.Token getToken()

Retrieves the Databricks access token.

This method uses an in-memory cache for fast token retrieval. Tokens are refreshed automatically when expired.

Specified by:
  `getToken` in interface `com.databricks.sdk.core.oauth.TokenSource`
Returns:
  A Token object containing the access token

#### getManagementEndpointToken

    public com.databricks.sdk.core.oauth.Token getManagementEndpointToken()

Retrieves a token for accessing the Azure Management endpoint.

This method uses an in-memory cache for fast token retrieval. Tokens are refreshed automatically when expired.

This token is used for operations that require access to Azure Resource Manager, such as managing workspace resources.

Returns:
  A Token object containing the access token for the Azure Management endpoint