rebremer , thanks for sharing. but, were you reading data from SQLPool with managed identities on the notebook and db_datareader failed? Is that what happened? Or were you trying to read the data from the pipeline and the permission was not enough?
Johannes_Vink - I forgot to add more information about your question:
there are limitations for managed identities on SQL Pool documented here:
https://docs.microsoft.com/en-us/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest
But the syntax would be like: spark.read.option("useAzureMSI","true") - anyway, there is some discussion about this here https://github.com/MicrosoftDocs/azure-docs/issues/45261 and they updated the docs here: https://docs.microsoft.com/en-us/azure/databricks/data/data-sources/azure/synapse-analytics
Alternatively, if you use ADLS Gen2 + OAuth 2.0 authentication or your Azure Synapse instance is configured to have a Managed Service Identity (typically in conjunction with a VNet + Service Endpoints setup), you must set useAzureMSI
to true
. In this case the connector will specify IDENTITY = 'Managed Service Identity'
for the databased scoped credential and no SECRET
.