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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
robzib
Regular Visitor

Unable to Set-DataGatewayInstaller with PrincipalObjectIds from app

It used to be possible to run Set-DataGatewayInstaller with principal id (object id) as application. Did something change in the last few weeks because I am running scripts that used to pass with no problems.

Currently if I run command below I get "Set-DataGatewayInstaller: Response status code does not indicate success: 401 (Unauthorized)"

Set-DataGatewayInstaller -PrincipalObjectIds <App object ID>-Operation Add -GatewayType Resource

 

Because I can't add this, any Gateway Datasource that I create is missing service principal under Manage users and i can't bind dataset to gateway because service principal isn't authorized.

 

Any idea why is this happening?

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @robzib ,

 

Please check:

  • If your gateway has been updated to the lasted version or there are Inconsistent versions between gateway members in a cluster. Many issues can surface when the gateway version is out of date. 
  • To test if the gateway has access to all the required ports, run the network ports test
  • You might encounter installation failures if the antivirus software on the installation machine is out of date. 
  • You might encounter installation failure when anitivirus software, like McAfee Endpoint Defender, is enabled. Configure your antivirus software to ignore the gateway process.

For more details, please refer to:

Troubleshoot the on-premises data gateway | Microsoft Learn

 

Best Regards,

Jianbo Li

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

 

 

hi @v-jianboli-msft 

 

Thank you for your suggestion, but my issue is not with gateway install. I've spent some time today to go through my implementation that used to work, and I managed to pinpoint the issue. It turns out that It's no longer possible to PostDatasetUser with type App and use service principal identifier. If you go to bind-to-gateway-in-group documentation there is an info block stating "Add the API caller principal as a data source user on the gateway." but when I try to do that I get an error. If you go to post-dataset-user documentation, under limitation it's stated that "Adding permissions to service principals (app principalType) isn't supported".

Not sure what to do because I can't call BindToGateway without adding my principal as user. This used to work because I have Azure tenant used for proof of concept and code that no longer works on another tenant.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.