Forum Discussion
WDarwish
2 years agoFrequent Visitor
Fabric Warehouse - Service Principal Connection
I want to build an application to write data into a Fabric Warehouse. This article says that there are 2 ways to connection to a Fabric Warehouse SQL Endpoint: https://learn.microsoft.com/en-us/fab...
- 2 years ago
Maybe this blog will help?
How to use service principal authentication to access Microsoft Fabric's OneLake - Sam Debruyn
kjellvs
Helper I
2 years agoI am trying to achieve the exact similar thing, however when authenticating with
ClientSecretCredential in python, I am unable to write to the warehouses. I am able to read from the same warehouses though.
More specifically, I get the following Error:
The INSERT permission or external policy action 'Microsoft.Sql/Sqlservers/Databases/Schemas/Tables/Rows/Insert' was denied on the object '[table]', database '[warehouse name]', schema 'dbo'.
The INSERT permission or external policy action 'Microsoft.Sql/Sqlservers/Databases/Schemas/Tables/Rows/Insert' was denied on the object '[table]', database '[warehouse name]', schema 'dbo'.
When using AzureCliCredential, this problem does not persist.
I have tried making the service principle admin (similar to my az credentials), but that also did not help.
Any clue how to have the service principle write to the warehouse?
kind regards,
Kjell
AndyDDC
Most Valuable Professional
2 years agoHi kjellvs how are you trying to write to the Warehouse? If you are trying to write to the storage directly it won't work, inserts into the warehouse can only be done via the sql endpoint of the warehouse - just checking to see how you're inserting so please forgive me if you already know this
- kjellvs2 years ago
Helper I
Hi Andy, thank you for the reply. I was indeed trying to write via the SQL endpoint.
I found a fix by giving:
GRANT INSERT ON SCHEMA::dbo TO public;I didn't know I had to configure these additional rights.
Kind regards,
Kjell