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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
vamshikrishna20
Helper III
Helper III

Refresh Gen2 Dataflow with Rest API

Hi, 

 

Did anyone tried refresh gen2 dataflows using Power BI Rest API's. I am trying to refresh gen dataflow from ADF using Power BI Rest API's with spn authentication, but uinable to do and it says spnbasedauth not allowed. 

 

if anyone has tried it earlier, please help

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hi @vamshikrishna20,
Thank you for posting your query in the Microsoft Fabric Community Forum.

Azure Data Factory does not support any authentication method that can successfully trigger a Gen2 Dataflow refresh.

Gen2 Dataflows currently require delegated user authentication, which ADF cannot provide when calling the Power BI REST APIs. Because of this, ADF-based orchestration is not supported for Gen2 Dataflow refresh scenarios, regardless of the authentication approach.

If you need to orchestrate refreshes, the supported options are:

  • Fabric Data Pipelines
  • Power Automate
  • Built-in scheduling within Fabric

If ADF orchestration is a strict requirement, you may need to redesign the solution so ADF loads data upstream (Lakehouse/Warehouse) and Gen2 Dataflows consume that data instead.

 

Thanks, @Zanqueta for sharing valuable insights.

Best regards,
Ganesh Singamshetty.

Hi @vamshikrishna20 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

I hope the information provided was helpful. If you still have questions, please don't hesitate to reach out to the community.

 

Hi @vamshikrishna20 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.

Zanqueta
Super User
Super User

Hi @vamshikrishna20 ,

 

At present, the refresh API for Gen2 Dataflows has some important limitations:

Key Points:

  1. SPN (Service Principal) is not supported for Gen2 Dataflows
    The error message “spnbasedauth not allowed” confirms this. For Gen2 Dataflows, only delegated user authentication is supported, not SPN.
    This differs from datasets, where SPN is allowed.
  2. Why this limitation exists
    Gen2 Dataflows are part of the Fabric architecture, and the refresh API is not yet fully aligned with SPN-based authentication. Microsoft is working towards enabling enterprise scenarios, but for now, only OAuth2 with user credentials works.

Possible Alternatives:

  • Option 1: Use a user account without MFA
    Configure a technical account (with MFA disabled) and obtain an OAuth2 token via
    https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
    using grant_type=password.
    Then call the API:
  • POST https://api.powerbi.com/v1.0/myorg/dataflows/{dataflowId}/refreshes

Reference:

Dataflows - Refresh Dataflow - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Option 2: Use Power Automate or Fabric Pipelines
Instead of ADF + API, you can use Fabric Data Pipelines or Power Automate to schedule refreshes. These methods already support delegated authentication without complications.
 

If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.

Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.

If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn

Hi @Zanqueta - which authentication can support if i want to refresh gen2 dataflows using ADF

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.