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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Richtpt
Frequent Visitor

DevOps Release Pipeline with Power BI problems

I'm working on a Release pipeline in DevOps.  I'm using the Power BI Actions to publish the pbix to a workspace and that's working fine.  I then need to take ownership, update a parameter in the report and refresh the data.  I can't use the Power BI Actions TakeOwnership, UpdateParameters & DataRefresh because you have to hard-code the Dataset name.  I checked with the guy who wrote these and he said right now this is how it is written - you can't even use a pipeline variable.  I'm using a service principal for the Power BI service connection and that's working.

 

Using Powershell I'm able to take ownership and update the parameter.  The problem is after taking ownership the gateway connection is missing.  In fact, if I do it through the website I get the same problem - take ownership, try to refresh and get this error, "Refresh failed because this dataset requires a gateway. Please select a gateway from dataset settings.".  I CAN go to the Gateway connection, update the connection and then all is fine.

 

I have the MicrosoftPowerBIMgmt module installed.  

 

I found this great video from Guy in a Cube about doing this:  Refresh your data in Power BI WITHOUT a user??? - YouTube.  Here he says I have to add the Service Principal as an Administrator of the gateway.  When I follow his steps to do this using Powershell 7 I get this error doing Add-DataGatewayClusterDatasourceUser:

 

Add-DataGatewayClusterDatasourceUser: Response status code does not indicate success: 404 (Not Found) ErrorCode: ADGraphEntityOperationFailedResourceNotFound

 

Anyone have any suggestions what I need to do to update a parameter in the report and refresh the dataset?  Thanks!

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Richtpt ,

First of all, make sure you have created the service principal object, if not, please refer to the following links to create it.

Embed Power BI content with service principal and an application secret

Power BI Service Principals 101

Step 1 - Create an Azure AD app
Step 2 - Create an Azure AD security group
Step 3 - Enable the Power BI service admin settings
Step 4 - Add the service principal to your workspace

I watched the video that you mentioned. When the blogger used Powershell to add the service principal as data source user, he used his own gateway admin account to log in and executed the command Add-DataGatewayClusterUser

yingyinr_3-1636970217742.png

Besides that, please check if you have given the appropriate values for the parameters applied in below command:yingyinr_2-1636969763078.png

-GatewayClusterId

-GatewayClusterDatasourceId

-Identifier : provide the object id of service principal

Object ID:

yingyinr_1-1636969555797.png

yingyinr_0-1636969548330.png

Best Regards

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

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Richtpt ,

First of all, make sure you have created the service principal object, if not, please refer to the following links to create it.

Embed Power BI content with service principal and an application secret

Power BI Service Principals 101

Step 1 - Create an Azure AD app
Step 2 - Create an Azure AD security group
Step 3 - Enable the Power BI service admin settings
Step 4 - Add the service principal to your workspace

I watched the video that you mentioned. When the blogger used Powershell to add the service principal as data source user, he used his own gateway admin account to log in and executed the command Add-DataGatewayClusterUser

yingyinr_3-1636970217742.png

Besides that, please check if you have given the appropriate values for the parameters applied in below command:yingyinr_2-1636969763078.png

-GatewayClusterId

-GatewayClusterDatasourceId

-Identifier : provide the object id of service principal

Object ID:

yingyinr_1-1636969555797.png

yingyinr_0-1636969548330.png

Best Regards

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

AH!  I was using the wrong Object ID!  I should have paid better attention to the video.  Thanks very much for pointing that part out!  🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors