Forum Discussion

robzib's avatar
robzib
Regular Visitor
3 years ago

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

  • 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.

     

     

    • robzib's avatar
      robzib
      Regular Visitor

      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.