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