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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Why does my Custom Connector not refresh?

Hi Guys,

 

I've successfully created a custom connector and published it on my personal gateway and was able to refresh it. Due to company policy, I can't keep that connector on my gateway and have had to migrate it to another cluster on which I am not an Admin but a user of that connector. I set up the report, found the connector on the gateway and when I tested the refresh, it gave me this error:

2020-04-28 17_21_10-Power BI.png

 

{"error":
  {"code":"PowerBINotAuthorizedException","pbi.error": 
    {"code":"PowerBINotAuthorizedException",
     "parameters":{},
     "details":[],
     "exceptionCulprit":1
    }
  }
}

 

Please can you support?

Kind Regards,

Andrei

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

I have not done a lot of work with custom connectors but this page https://docs.microsoft.com/en-us/power-bi/service-gateway-custom-connectors#considerations-and-limit... has the following note in the section on Considerations and Limitations :

 

  • For custom connectors to work with the on-premises data gateway, they need to implement a “TestConnection” section in the custom connector’s code. This section isn't required when you use custom connectors with Power BI Desktop. For this reason, you can have a connector that works with Power BI Desktop, but not with the gateway. For more information on how to implement a TestConnection section, see this documentation.

 

Have you created a TestConnection method in your connector?

View solution in original post

2 REPLIES 2
d_gosbell
Super User
Super User

I have not done a lot of work with custom connectors but this page https://docs.microsoft.com/en-us/power-bi/service-gateway-custom-connectors#considerations-and-limit... has the following note in the section on Considerations and Limitations :

 

  • For custom connectors to work with the on-premises data gateway, they need to implement a “TestConnection” section in the custom connector’s code. This section isn't required when you use custom connectors with Power BI Desktop. For this reason, you can have a connector that works with Power BI Desktop, but not with the gateway. For more information on how to implement a TestConnection section, see this documentation.

 

Have you created a TestConnection method in your connector?

Anonymous
Not applicable

Hi,

 

Yes I can confirm the TestConnection has been added. It worked on My personal Gateway. 

2020-04-29 08_51_37-PBIAPI.pq - Visual Studio Code.png

I think I have found the reason in the document you provided. In the last bullet point it says:

  • OAuth for custom connectors via gateways is currently supported only for gateway admins but not other data source users.

That's not a good news after all the work I've put in. Thanks for the support

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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