Access SQL Database in Synapse Notebook and getting MSI Token failure

Mritunjay Daiya 0 Reputation points
2023-08-17T07:13:47.46+00:00

Hello Everyone,

I have a piece of code and I don't know what are the required steps to run the code given below. Every time I run this code it give me error as "MSI Token failure: Failed to acquire access token from IMDS".

The thing I want to achieve is - I want to access the database without passing the credentials like username and password to the code, I simply want to use the managed identity to implicitly pass the token which grant me permission to access the database and its file.

If anyone knows any other approach to achieve the same do let me know.

Thanks in advance.

jdbc_url = "jdbc:sqlserver://<Server-name>.database.windows.net:1433;database=<Database-name>;Authentication=ActiveDirectoryMSI"

df = spark.read.jdbc(url=jdbc_url, table=<Table-Name>)
Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

Microsoft Security | Microsoft Identity Manager

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    2 deleted comments

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.