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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.