cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
paritoshmishra
Helper I
Helper I

Devops Automation of Embedded Power BI

Scenario

We have 10  Azure  SQL Database  Server and each server has almost 10 databases. Each database associates with each client.

I have embedded Power BI with our enterprise sites. I have implemented  PowerBI workspace-based Isolation.

 

I want to publish a report on  Power BI online and creating automation that changes DB server,  DB name, and DB  credential thru the release pipeline without any manual intervention to input.

 

I am able to publish the report with parametrize  DB server and DB  and with DB server credentials. So by calling POwerBI API, I have changes DBName and its works perfectly. But is only limited to that  DB server.

If I change DB server Name with POwerBI API then it asks for the credential to input manually (credential field  may be empty) otherwise it cant refresh

As Power BI rest API to change credentials is only support PATCH verbs, it cants works when the DB server changed.

I do not have much knowledge of Power BI  

Is there any way we publish the report contains only schema only (not data ) without associates any DB /DB server and we attaches that report with  DB /DB server on Power Online only or from our application?

 

Or 

Is any way to automate the change DB server , DB Name and its credential by using PowerBI API .net SDK  V3



Please help me out.


Thanks in advance 
Paritosh Mishra  

 

 

 

 

 

 

 

 


 

1 ACCEPTED SOLUTION

This is solved. Place of  Powershell  variable declaration in a script   have  an issue

 

Thanks  

View solution in original post

4 REPLIES 4
v-lionel-msft
Community Support
Community Support

Hi @paritoshmishra ,

 

Maybe you can refer to the links.

Configure credentials programmatically for Power BI 

Automation with service principals 

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have run Power BI API to change database  by calling 
"$datasourePatchUrl = "https://api.powerbi.com/v1.0/myorg/groups/$targetworkspaceId/datasets/$importeddatasetId/Default.Upd... .I have used admin user credential hardcoded to acquire token. 
Its works perfectly on my local computer 

By when  I run the same script on Vsts pipeline on powershell task , its run all PowerBI rest api such as aaquire token , get workspaces , get datasets ect , but its fails while updating db change "Default.UpdateDatasources"  api .Its throw error " 

The remote server returned an error: (404) Not Found." 

I didn't understand how 404 status throw even  same script run perfectly on local

Please help me out 

TIA



Hi @paritoshmishra ,

 

In other words, you can execute this script on the local PowerShell, but you can’t execute this script on Azure Pipelines?

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is solved. Place of  Powershell  variable declaration in a script   have  an issue

 

Thanks  

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors