Class AzureMSICredentials

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

    public class AzureMSICredentials
    extends com.databricks.sdk.core.oauth.RefreshableTokenSource
    Provides authentication functionality using Azure Managed Service Identity (MSI).

    This class extends RefreshableTokenSource 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 Detail

      • refresh

        protected com.databricks.sdk.core.oauth.Token refresh()
        Refreshes the Databricks access token.

        This method is called automatically when the token expires or when a token is requested for the first time.

        Specified by:
        refresh in class com.databricks.sdk.core.oauth.RefreshableTokenSource
        Returns:
        A new Token object containing the refreshed access token
      • getManagementEndpointToken

        public com.databricks.sdk.core.oauth.Token getManagementEndpointToken()
        Retrieves a token for accessing the Azure Management endpoint.

        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