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

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  

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.

Top Solution Authors
Top Kudoed Authors