Showing results for 
Search instead for 
Did you mean: 

Custom Connector in Power Automate/Microsoft Flow for Power BI Data Flow Refresh


Recently, I came across an issue where a customer wanted to automate the dataflow refresh in Power BI, whenever there is an update in an Excel file stored in Teams/SharePoint. As of today, Power BI provides a connector to execute dataset refresh but none for dataflow refresh.


Here are the steps we have executed to create a custom connector in Flows to achieve this.

A. Azure AD APP registration:

The first step is to register an application(Web App) in Azure AD. Ref:- .

Please keep the Client ID and Client secret ready. We will need it while creating the Custom Connector in Flows.

B. Creating the Connector in Flows:

  1. Create the custom connector from Flows -> Data -> Create from Blank


2. General section:

customcon.2.PNG3. In the security section, select the Authentication Type as ‘Oauth2’, Identity Provider as ‘Azure AD’. Put in the Client Secret and Client ID from the App registration in Azure AD and fill the remaining steps as follows:

customcon.3.PNG4. Once you update the connector, you will get the Redirect URL, which you need to add in the Authentication Section of your App registration as follows:

customcon.4.PNG5. Under API permissions , give all the necessary permissions (Choose Power BI service -> Select the APIs and select Delegate all permission and Grant admin consent)

customcon.5.PNG6. Now coming back to the custom connector part: Under Definition we need to do the following:customcon.6.PNG7. When we select Import here and choose the verb as POST and then the REST API for dataflow refresh, please ensure we are deleting the POST portion otherwise we will get 404 error . Please see the screenshot below. The highlighted part in red should be deleted, and then we should import:


It should look like this:

customcon.7.1.PNG8. Now, we head over to the Test section and Select the account to the Connections section -> sign in. Put in your group (workspace ID) and Dataflow ID and test connection:


We should be getting a 200 response here. If the Test Connection fails, then the actual Flow will definitely fail.

The response should look like this:



Blockers :

When using this connector in any Flow, we may encounter 400 error with the below error message:


"error": {

"code": "BadRequest",

"message": "Bad Request",

"details": [


"message": "'refreshRequest' is a required parameter",

"target": "refreshRequest"






Steps to overcome this error:

We need to update the definition of the custom connector to include the ‘refreshRequest’ parameter, as indicated by this error. Please see below for the steps to update the definition of the connector :

  1. Click on POST, add this to the URL field: and paste this to the Body section:


              "refreshRequest": "y"   



2. Click on Import and see next page of this document.

3. Scroll down in the same page and click on the ellipsis (…) next to body, select Edit.

customcon.11.PNG4.Click on the ellipsis (…) next to refreshRequest and select Edit.


5.Type y in the Default value field and click on Update connector.


6.Create a new Microsoft Flow and test. In the custom connector action, you will now see that the ‘refreshRequest ‘parameter is displayed.



Author: Shinjini Ghosh

Reviewer: Mounika Narayana Reddy

About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: and twitter I also write at, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -