Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
My service principal has admin access to the workspace. I used that spn to create fabric conection in airflow. Lakehouse read and write works fine, when i try to read table from warehouse. I am getting error as below
Py4JJavaError: An error occurred while calling o5533.synapsesql. : com.microsoft.spark.fabric.tds.error.FabricSparkTDSInternalAuthError: HTTP request forbidden. Request Id - 25ef7e29-b7ac-404d-add5-d1148821d70b. at com.microsoft.spark.fabric.tds.utility.FabricTDSRestfulAPIClientv2$.sendHttpRequest(FabricTDSRestfulAPIClientv2.scala:183) at com.microsoft.spark.fabric.tds.utility.FabricTDSRestfulAPIClientv2$.submitAndProcessHttpRequest(FabricTDSRestfulAPIClientv2.scala:105) at com.microsoft.spark.fabric.tds.meta.FabricTDSEndPoint$.$anonfun$discover$9(FabricTDSEndPoint.scala:326)
If i run the same notebook via pipeline, i am not getting any issues. Anyone else facing issue while trying to run a notebook which access warehouse tables via airflow?
my code -
Solved! Go to Solution.
Hi @phktu,
I wonder if it has something to do with the special characters in your service principal's name?
I just tried running the exact grant statement that you ran and it works in my environment:
Are you able to have the service principal renamed to remove special characters and spaces?
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Hi @phktu
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
open
Hi @phktu,
That FabricSparkTDSInternalAuthError: HTTP request forbidden means your notebook’s identity can reach the Lakehouse (OneLake/ABFS) but doesn’t have permission to the Warehouse SQL engine that sits behind spark.read.synapsesql("Warehouse.dbo.configuration"). Pipelines work because they typically run under a different identity that does have the required Warehouse SQL permissions.
-- Read tables
ALTER ROLE db_datareader ADD MEMBER [<your-spn-app-id-or-name>];
-- Optional: allow INSERT/UPDATE/DELETE
ALTER ROLE db_datawriter ADD MEMBER [<your-spn-app-id-or-name>];
The connector requires item-level + object-level permissions to read tables. Microsoft documents this requirement here. Using a service principal with Warehouse is supported and documented here.Once those are in place, your line should work:
config_df = spark.read.synapsesql("Warehouse.dbo.configuration")If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
I can't create a user in fabric warehouse
Hi @phktu ,
Thanks for reaching out to the Microsoft fabric community forum.
Once warehouses are provided control plane permissions to an SPN through workspace roles or Item permissions, administrators can use T-SQL commands like GRANT to assign specific data plane permissions to service principals, to control precisely which metadata/data and operations an SPN has access to. This is recommended to follow the principle of least privilege.
GRANT SELECT ON <table name> TO <service principal name>;
I hope this information helps. Please do let us know if you have any further queries.
Thank you
SPN has admin access to workspace, I tried to run the script you provided, getting the below error
Hi @phktu,
I wonder if it has something to do with the special characters in your service principal's name?
I just tried running the exact grant statement that you ran and it works in my environment:
Are you able to have the service principal renamed to remove special characters and spaces?
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Hi @phktu
I wanted to check if you had the opportunity to review the information provided by @tayloramy .Please feel free to contact us if you have any further questions.
Thank you.
Hi @phktu,
My mistake, I was misreading the documentation.
SQL Granular Permissions - Microsoft Fabric | Microsoft Learn
Just execute the grant statements and the user will be created automatically.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.