Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hello everyone,
I am trying to connect with warehouse using service prinicpal to share my data externally.
Steps I have performed:
1- Created a service principal on Azure
2- Added service principal to Workspace as Admin (Workspace which containes warehouse which I want to share externally)
3- Created secret key for the application (service principal)
Error I am facing:
InterfaceError: ('28000', '[28000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Could not login because the authentication failed. (18456) (SQLDriverConnect)')
My code:
Solved! Go to Solution.
Hi @zas3112 ,
Can you check if below tenant level settings are on? and have added your service principal there?
If you have enabled the above tenant level settings and add your service principal, then you are good to go!
I am sharing the sample code to connect to the fabric warehouse:
Hello @MonicaCVL
Thankyou for the guide, this method worked
Furthermore, can you please clarify that this mode of aunthetication gives you access to all workspace items or just the warehouse? My serive principal is the admin of the workspace, if yes then can you please further guide as how can I limit service prinicpal to only warehouse
Hi @zas3112,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you are facing issues while connecting to your warehouse using service principle. As @MonicaCVL already responded to your query, kindly go through the response and comfirm if it solves your issue.
I would also take a moment to thank @MonicaCVL, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @zas3112 ,
Can you check if below tenant level settings are on? and have added your service principal there?
If you have enabled the above tenant level settings and add your service principal, then you are good to go!
I am sharing the sample code to connect to the fabric warehouse:
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
2 |