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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mjohannesson
Advocate I
Advocate I

Error when updating connection string in Power BI Embedded

I'm using the Power BI Embedded sample application to import a PBIX desktop file into an existing workspace. The import works fine but when I try to update the connection string, I get an error:

Ooops, something broke: Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'NotFound'
at Microsoft.PowerBI.Api.V1.Gateways.<PatchDatasourceWithHttpMessagesAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Api.V1.GatewaysExtensions.<PatchDatasourceAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ProvisionSample.Program.<UpdateConnection>d__28.MoveNext() in C:\Projects\power-bi-embedded-integrate-report-into-web-app-master\ProvisionSample\Program.cs:line 625
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at ProvisionSample.Program.<Run>d__18.MoveNext() in C:\Projects\power-bi-embedded-integrate-report-into-web-app-master\ProvisionSample\Program.cs:line 240

 

Any idea what might be the problem?

13 REPLIES 13
JorgeDiego
Advocate I
Advocate I

For me is also working. Smiley Happy

Eric_Zhang
Employee
Employee

@mjohannesson@avdknijff@JorgeDiego@pridge@peril49

At the moment I post, I can update the connection string with the option 7 in this power-bi-embedded-integrate-report-into-web-app. Only when I type a wrong datasetID,  can I get the same error. Can you try to get the datasets with option 8.Retrive a list a datasets published to a workspace  and ensure you've input the correct datasetid?

Capture.PNG

This issue has now been corrected by Microsoft, at least in West Europe, so now it's working for me.

@mjohannesson instead of a NotFound exception I now get a BadRequest, but I can update the connectionstring... What is the format of your connectionstring?

This is the format I´m using:

 

Data Source=yourDataSource;Initial Catalog=yourDataBase;User ID=yourUser;Password=yourPass;

 

I hope it helps you.

It was the one I was always using. Problem lies with the fact that there was not set a firewall rule for the Gateway. Once I granted access to the database for the specific IP Address the problem was solved. I only got the IP Adress by using the PowerBI-CLI. 

 

[ powerbi ] {"error":{"code":"DM_GWPipeline_Gateway_DataSourceAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_DataSourceAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2146232060"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Cannot open server 'engiep-dev-weeu-sql' requested by the login. Client with IP address 'xx.xx.xx.213' is not allowed to access the server.  To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.  It may take up to five minutes for this change to take effect."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2146232060"}},{"code":"DM_ErrorDetailNameCode_UnderlyingNativeErrorCode","detail":{"type":1,"value":"40615"}}]}}}

avdknijff
Frequent Visitor

I'm experiencing the exact same issue. Workflow which previously worked now returns this error. Are there any solutions available yet.

avdknijff
Frequent Visitor

I'm experiencing the exact same issue.  Our workflow which worked previously now returns this exact error message. I'll be happy to hear of anyone has a solution yet.

JorgeDiego
Advocate I
Advocate I

We have seen the same error. We have reviewed the dll´s in order to use the lastest versions, but the error is still there. Any solution? It seems a Microsoft issue.

pridge
New Member

Hi,

 

We started seeing the same thing in an automated deployment script we have. We get it even when redeploying the exact same package as was successfully installed two days ago, but yesterday it failed.

peril49
Frequent Visitor

i'm seeing the same problem. was working fine last week.

kriwi
New Member

We've started to experience the same error. Any solution to this yet? 

lars123
New Member

We've started seeing the same error when updating credentials. This has worked previously, and nothing has changed in our implementation, so this looks like an error on Microsofts end.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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