please can some one guide me how to Establish Connection to SQL server using manage identity in data bricks using manage identity object id
I am using following code
”’
from azure.core.exceptions import ClientAuthenticationError
from azure.identity import DefaultAzureCredential
# Create a secret client using the DefaultAzureCredential
c_id = DefaultAzureCredential(managed_identity_client_id=client_id)
try:
#https://database.windows.net/.default
#bipp-training-server.database.windows.net/.default
secret = c_id.get_token("https://database.windows.net/.default")
except ClientAuthenticationError as ex:
print(ex.message)
”’
and I am getting DefaultAzureCredential failed to retrieve a token from the included credentials
2
Answers
If you want to connect
azure managed identity
with azure DatabricksFollow this SO thread by
@Alex Ott
Sample code
Refer this document for connecting SQL to azure Databricks
Managed identity is associated with virtual machines, and as of right now Databricks doesn’t support managed identities for Databricks clusters. So the only choice is to use Service principal authentcation