Forum Discussion
PowerBI Embedded Sample Connection string
Hi,
if you give connection string like below it will work
Data Source=xxxx.database.windows.net;Initial Catalog=dbName;User ID=xxx;Password=xxx;
- TheEdcomm9 years agoRegular Visitor
I tried using same format but still getting following error -
Ooops, something broke: Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'BadRequest'
at Microsoft.PowerBI.Api.V1.Datasets.<SetAllConnectionsWithHttpMessagesAsync>d__15.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.DatasetsExtensions.<SetAllConnectionsAsync>d__21.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__27.MoveNext() in C:\Projects\PowerBi\sample\Project\ProvisionSample\Program.cs:line 592
--- 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__17.MoveNext() in C:\Projects\PowerBi\sample\Project\ProvisionSample\Program.cs:line 235- AnuragR9 years agoRegular Visitor
Did you get the issue resolved?
I am stuck at same place with same exception
Please share a solution
Thanks- alladisai9 years agoRegular Visitor
Please use a "Direct query" option (not import) when you are building the .pbix file. Once you do this deploy using option 6 then use the option 7 to update the connection string.
use the connection string in below format
"Data Source=xxxx.database.windows.net;Initial Catalog=dbName;User ID=xxx;Password=xxx;"
Note : this will work only for Sql server (not sure for other servers)
Regards
Sai
- alladisai9 years agoRegular Visitor
Please use a "Direct query" option (not import) when you are building the .pbix file. Once you do this deploy using option 6 then use the option 7 to update the connection string.
use the connection string in below format
"Data Source=xxxx.database.windows.net;Initial Catalog=dbName;User ID=xxx;Password=xxx;"
Note : this will work only for Sql server (not sure for other servers)
Regards
Sai
- krish_powerbi9 years agoNew Member
I have updated Connection string in the same format, then option 7 giving username and password for Azure SQL it says not data source found, please suggest me, Thanks.
- prokurors9 years agoAdvocate III
Thanks Nithya, your solution worked in my case!
P.S. This stuff is not easy or intuitive... I hope this Power BI embedded maintenance stuff will be enhanced. Why it is not possible to upload power bi report directly through Azure management portal?
- krish_powerbi9 years agoNew Member
I have updated Connection string in the same format, then option 7 giving username and password for Azure SQL it says not data source found, please suggest me, Thanks.
- krish_powerbi9 years agoNew Member
I have updated Connection string in the same format, then option 7 giving username and password for Azure SQL it says not data source found, please suggest me, Thanks.