Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
YvonneA2020
Frequent Visitor

Power BI Rest API create data source gives PowerBIEntityFrameworkOperationException

Hi,
I have been using the Power BI API Gateways - Create Datasource  to add a datasource to my gateway after some other errors about the database username and connection string I now have the error PowerBIEntityFrameworkOperationException which to me seems an intenal error and not a 400 BadRequest because I have no idea what I need to fix in my request to solve this issue.
My request body:
{
"dataSourceType": "Sql",
"connectionDetails": "{\"server\":\"LAPTOP-xxxxxx\\\\PARKBASE\",\"database\":\"AdventureWorksDW2017\"}",
"credentialDetails": {
"credentials": "bD5woAOt/rtaVeGAC+RMDL.......",
"credentialType": "Windows",
"encryptedConnection": "Encrypted",
"encryptionAlgorithm": "RSA-OAEP",
"privacyLevel": "Organizational",
"useCallerAADIdentity": false
},
"dataSourceName": "YA26"
}

 The error:

{"error":{"code":"PowerBIEntityFrameworkOperationException","pbi.error":{"code":"PowerBIEntityFrameworkOperationException","parameters":{},"details":[]}}}

So it isn't telling me anything about what I'm doing wrong. 
I have added the same information in through the https://app.powerbi.com/  and that worked fine with the same information.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@YvonneA2020  @jpu  - We were having the same problem so we opened a support ticket with Microsoft. Today the support representitive asked us to try calling the API again. We did and it now appears to be working. We didn't need to make any changes on our side.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@YvonneA2020  @jpu  - We were having the same problem so we opened a support ticket with Microsoft. Today the support representitive asked us to try calling the API again. We did and it now appears to be working. We didn't need to make any changes on our side.

jpu
Frequent Visitor

I can confirm that error is gone. Thanks alot! 🙂

jpu
Frequent Visitor

I'm facing the same issue.. Any luck finding a solution?

lbendlin
Super User
Super User

Have you tried doing the same in the sandbox? (Via the "try it" button?)

 

Gateways - Create Datasource (Power BI Power BI REST APIs) | Microsoft Docs

 

 

I tried it and not suprisingly got the same error:
{"error": {"code": "PowerBIEntityFrameworkOperationException","pbi.error": {"code": "PowerBIEntityFrameworkOperationException","parameters": {},"details": []}}}

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.