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!Get Fabric certified for FREE! Don't miss your chance! Learn more
Hi everyone,
I have a question regarding a connection from Fabric to an on-prem SQL Server using a service principal.
Specifically, I need to mirror a database that resides on an on-prem SQL Server 2022 instance, and I want to authenticate using a service principal (Azure Entra ID authentication).
I have a gateway installed to allow Fabric to connect, but when I create the connection I get the following error:
“A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)”
I’ve tried following several guides, including adding the environment variable PBI_SQL_TRUSTED_SERVERS with the value set to the server name I need to connect to, but nothing seems to work.
Has anyone faced the same issue or can provide some guidance?
Solved! Go to Solution.
Hi @Iaco96
This is AI generated and unverified but I hope it helps!
This error typically occurs because the SSL certificate presented by your on-prem SQL Server isn’t trusted by the gateway or the Fabric service when using Azure Entra ID authentication. Let’s break down the key points and possible solutions:
You have two main options:
Option A: Install a Trusted Certificate
Option B: Disable Certificate Validation (Not Recommended for Production)
Encrypt=True;TrustServerCertificate=True;
CREATE USER [<service-principal-name>] FROM EXTERNAL PROVIDER;
ALTER ROLE db_datareader ADD MEMBER [<service-principal-name>];
--------------------------------
I hope this helps, please give kudos and mark as solved if it does!
Connect with me on LinkedIn.
Subscribe to my YouTube channel for Fabric/Power Platform related content!
@Iaco96 the most current verion is 3000.294.7 as show on the first pic I sent, and if you were able to create the Service Principal on SQL Server with the ...
EXTERNAL PROVIDERconfirms your SQL instance been able to communicate with Azure Entra ID, thus, I agree with you:
This suggests the issue is specifically related to using an AD identity such as the Service Principal.
Perhaps is not supported "[...] you cannot directly connect to an on-premises SQL Server via the On-premises Data Gateway using a Microsoft Entra (Azure AD) service principal — the gateway does not natively support service principal authentication for on-premises SQL connections"
I would suggest you to reach out MSFT via a support case for confirmation.
Hope it helps, wish you best of lucks
Hi @Iaco96,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.
Hi @Iaco96 I think I would like to start with some simple questions to understand where you are in a series of steps requiered to stablish a Mirrored SQL Server;
#1. It all starts with a Gateway running and updated to the lastet version, from your issue description you mentioned a gateway being present, but, to the lastest update?
#2. Next is to create a connection to the on-prem sql via the gateway, have you created this? Is it here where you get the error trying to create the connection? or are you skipping the test of the connection? using a service principal works at connection level? have you tried other auth methods (e.g. Basic or Windows), they worked?
#3. On the target on-prem sql server, have you successfully created the service principal using FROM EXTERNAL PROVIDER? Has it been successfull? That is, is your on-prem sql server hosted and able to sync to the Azure Entra ID where the service-principal exists?
CREATE USER [<service-principal-name>] FROM EXTERNAL PROVIDER;
ALTER ROLE db_datareader ADD MEMBER [<service-principal-name>];
Mirroring has many different moving part, hence, fail points to consider and it's important to check one component at a time to get this figured it out! Before I suggest anything, more information is needed for properly guide you towards the resolution of your issue.
Start with the questions above and ping back ... all the very best.
Hi @svenchio
here the details you requested:
Gateway version
The gateway is running the version: 3000.278.5. Is this the last version according to you?
Connection creation
I created the connection during the setup of the SQL Server database mirror, following the same steps you described and selecting Service Principal as the authentication method.
At that point, I get a permission-related error.
I also tested using Basic authentication, and in that case it works correctly.
This suggests the issue is specifically related to using an AD identity such as the Service Principal.
Service Principal on SQL Server
On the master database, the login for the Service Principal has been created.
On the target database, the corresponding user has been created correctly and assigned the sysadmin role.
@Iaco96 the most current verion is 3000.294.7 as show on the first pic I sent, and if you were able to create the Service Principal on SQL Server with the ...
EXTERNAL PROVIDERconfirms your SQL instance been able to communicate with Azure Entra ID, thus, I agree with you:
This suggests the issue is specifically related to using an AD identity such as the Service Principal.
Perhaps is not supported "[...] you cannot directly connect to an on-premises SQL Server via the On-premises Data Gateway using a Microsoft Entra (Azure AD) service principal — the gateway does not natively support service principal authentication for on-premises SQL connections"
I would suggest you to reach out MSFT via a support case for confirmation.
Hope it helps, wish you best of lucks
Hi @Iaco96
This is AI generated and unverified but I hope it helps!
This error typically occurs because the SSL certificate presented by your on-prem SQL Server isn’t trusted by the gateway or the Fabric service when using Azure Entra ID authentication. Let’s break down the key points and possible solutions:
You have two main options:
Option A: Install a Trusted Certificate
Option B: Disable Certificate Validation (Not Recommended for Production)
Encrypt=True;TrustServerCertificate=True;
CREATE USER [<service-principal-name>] FROM EXTERNAL PROVIDER;
ALTER ROLE db_datareader ADD MEMBER [<service-principal-name>];
--------------------------------
I hope this helps, please give kudos and mark as solved if it does!
Connect with me on LinkedIn.
Subscribe to my YouTube channel for Fabric/Power Platform related content!
Hi @wardy912,
thank you for your response. However, for option B regarding the issue fix, there is no Advanced Setting available for the Fabric connection
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Fabric update to learn about new features.
| User | Count |
|---|---|
| 30 | |
| 15 | |
| 13 | |
| 7 | |
| 6 |
| User | Count |
|---|---|
| 52 | |
| 41 | |
| 28 | |
| 15 | |
| 14 |