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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
jaredf2691
Regular Visitor

Cannot get Power BI REST API Custom Connector to refresh in Power BI Service

Hi, refresh works fine (though it does take long) in Power BI Desktop, but I cannot get a successful refresh in Power BI Service.  We have an enterprise gateway set up and a connection created for it.  Both are "public" privacy levels.  Any ideas?  We use this one:

 

https://www.thepoweruser.com/2021/02/21/power-bi-rest-api-connector/

 

jaredf2691_0-1728569066945.png

 

2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @jaredf2691 - Check that your gateway is online. You can do this from the Admin Portal under Gateways.

Data Source Settings: Make sure the data source used in Power BI Service is correctly configured to use the same credentials as in Power BI Desktop. This includes the privacy level settings (both should be set to "Public" in your case).

Double-check the credentials set for your data source in the Power BI Service:

  • Go to your dataset in the Power BI Service.
  • Click on the ellipsis (...) next to your dataset and select Settings.
  • Ensure that the Data source credentials are correctly configured and match what is set up in Power BI Desktop.

Power BI known issues and troubleshooting - Power BI | Microsoft Learn

Re: Refresh failed: "internal service error", "tra... - Microsoft Fabric Community

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Anonymous
Not applicable

Hi @jaredf2691 ,

 

Thanks for @rajendraongole1 reply, that's really helpful!

 

@jaredf2691 For security, we do not recommend using custom connectors because many of them hardcode credentials and keys in PowerQuery using plain text, which makes it impossible to securely store passwords or secrets in Power BI Desktop. In addition, custom connectors need to follow a specific Power Query development pattern to successfully refresh the semantic model in the Power BI service. I recommend that you check that the RelativePath option must exist when the current connector uses Web.Contents so that Power BI can properly validate the location of the data source without generating an error in the Power BI service. Web.Contents - PowerQuery M | Microsoft Learn

 

You can also consider using other methods to extract tenant data. You can choose the appropriate method based on the technology that you or your company's technicians are familiar with.

  • Create a PowerShell script that exports your required data to a CSV file and uploads it to SharePoint or OneDrive.
  • You can also use Power Automate with Power BI in many ways. In relation to auditing, you can use Power Automate to send requests to the Power BI REST APIs and then store the extracted data in the location of your choice.

 

 

Best regards,

Mengmeng Li

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jaredf2691 ,

 

Thanks for @rajendraongole1 reply, that's really helpful!

 

@jaredf2691 For security, we do not recommend using custom connectors because many of them hardcode credentials and keys in PowerQuery using plain text, which makes it impossible to securely store passwords or secrets in Power BI Desktop. In addition, custom connectors need to follow a specific Power Query development pattern to successfully refresh the semantic model in the Power BI service. I recommend that you check that the RelativePath option must exist when the current connector uses Web.Contents so that Power BI can properly validate the location of the data source without generating an error in the Power BI service. Web.Contents - PowerQuery M | Microsoft Learn

 

You can also consider using other methods to extract tenant data. You can choose the appropriate method based on the technology that you or your company's technicians are familiar with.

  • Create a PowerShell script that exports your required data to a CSV file and uploads it to SharePoint or OneDrive.
  • You can also use Power Automate with Power BI in many ways. In relation to auditing, you can use Power Automate to send requests to the Power BI REST APIs and then store the extracted data in the location of your choice.

 

 

Best regards,

Mengmeng Li

rajendraongole1
Super User
Super User

Hi @jaredf2691 - Check that your gateway is online. You can do this from the Admin Portal under Gateways.

Data Source Settings: Make sure the data source used in Power BI Service is correctly configured to use the same credentials as in Power BI Desktop. This includes the privacy level settings (both should be set to "Public" in your case).

Double-check the credentials set for your data source in the Power BI Service:

  • Go to your dataset in the Power BI Service.
  • Click on the ellipsis (...) next to your dataset and select Settings.
  • Ensure that the Data source credentials are correctly configured and match what is set up in Power BI Desktop.

Power BI known issues and troubleshooting - Power BI | Microsoft Learn

Re: Refresh failed: "internal service error", "tra... - Microsoft Fabric Community

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.