I am receiving the below error while trying to access SQL server (get data--> SQL server database).
Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The received certificate has expired.)
Also, when I check the logs I get the below error info:
"Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.MashupDataAccessValueException: Mashup expression evaluation error" . The gateway was working fine before and now I get this error. I checked the certificate issued to the server and looks fine. I would appreciate if someone could advise what could be missing or the correct spot where I can check to resolve this issue.
I recently experienced this when using a colleagues computer - 30 minutes after updating the Report Server Version of our dashboard on my own computer. Which in my case put teh SQL server as being the issue to the side.
What I found was that on my own computer I had turned of "encrypt connection" in the data-source settings. Disabling that on my coleugues computer allowed us to refresh the data and the "certificate has expired" message has gone.
Also I had to re-do the password to authentication access to the SQL server - so it would seem these settings dont follow the user from PC to PC and the settings are on the comptuer itself (we have synced profiles etc, and use Power Bi Report Server - and SQL Server stored procedures to run the show).
Good luck 🙂
There can often be multiple certificates installed on a server. To check the one used by SQL Server you need to open SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for <server instance>, and then select Properties. On the Certificates tab you should see the details of the certificate that SQL Server is trying to use.
If the expiry date for that certificate is out of date you can find information here https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-encrypted-connections-... on how this should be setup.
Thank you for the reponse. I had checked the certificate navigating to SQL Server Network Configuration>Protocols for <server instance> Properties and looks all fine with the certificate. I also made sure that there is only one certificate that SQL server is using and it does have a valid expiry date untill 2020.
Also, the fore encryption settings are set to "Yes".
Just to be more clear what exactly Im doing is.. I am trying to
1. Open PowerBI desktop on my local machine
2. Click on "Get Data".
3. Select SQL server database
4. And then getting the certificate error when I try to connect the SQL server after the window I pasted below:
The On-premises gateway is also connected and is up and running.
I would appreciate any help on this.
So if the expiry date has not expired there are a couple of other things you could check.
Was the certificate updated recently? If so was the server restarted after the certificate was updated? If not try restarting SQL Server to make sure it is picking up the latest certificate.
There have been other reports of this issue. You could check the last response on this thread https://community.powerbi.com/t5/Service/can-not-refresh-dataset-both-from-refresh-now-and-schedule/...
Or as a last resort, if you have force encryption set at the server level you could change the data source option in your Power BI Reports to not require encryption. This means that the client will not double check the validity of the certificate, but the server setting will still ensure that the connection is encrypted.
You can check if the connections are actually encrypted by running the following SQL query
SELECT encrypt_option FROM sys.dm_exec_connections
Otherwise you might need to ask this question on some SQL Server forums as this seems to be more of an issue with SQL Server than Power BI.
Yes, the certificate was new and I dint restart the services. So, I had restarted the services. However, the error still persist.
Changing the encryption settings for the data source option in Power BI Reports to not require encryption worked.
Power BI Desktop > Data Source Settings > uncheck the 'encrypt connections' check box (for the data source).
Thanks you so much for your response.
For anyone looking for this, here is the link :
I'm running into this same problem, fixed this when using the desktop app but still having issues with the Power Bi service gateway connection. Where you able to find a solution?
We're just using the encryption setting, leaving it off works for us as we now use encryption using the Azure (Denodo) data. Also we've moved away from report server desktop (which is where we encountered this niggling error), so now we are just using latest desktop version.
I keep that setting off, = Power BI Desktop > Data Source Settings > uncheck the 'encrypt connections' check box (for the data source).
Assuming that the server certificate you are using is actually up-to-date...
That sall I can do I'm afraid as time poor..
Looking to provide insight on how our team was able to resolved this.
When access the MSSQLSERVER properties, the newly updated certificate did not show up in the Certificate drop-down list. One of our IT specilist restarted SQL over the weekend and ensure that the correct certificate appeared in the MSSQLSERVER properties.
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!