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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EddieE
Regular Visitor

PowerBIIntegration.Refresh() PowerApp workaround??

Hi,
Does anyone know of a workaround for the PowerBIIntegration.Refresh() function inside a PA Visual using an Existing PowerApp?? I've just finished a PowerApp - built separately, not using 'Create New', to leverage the Tablet format - and find I cannot use the PowerBIIntegration.Refresh() function, which I need to 😞 

 

We are using Direct Query to SQL so any data adds/edits update in the data source but without the PowerBIIntegration.Refresh() option, users need to reload their page in the Service to see their new data. Such a stupid and finicky feature ...

 

Thanks

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

There is no workaround, you need to start over.

View solution in original post

@lbendlin 

Thanks mate. I was hoping for a better outcome - not to be.

 

Seems this should be something that MS could look at fixing though, it's been an idea for 4+ years now. My current 'workaround' is for users to reload their browser to see their new data, ie

 

1. user clicks company logo, triggers a bookmark that displays the app

2. user makes edits / adds new data and submit form/s

3. user clicks bookmark icon to 'go back to report' / hide app

4. user reloads their browser to see new data

 

Not ideal but works.

 

Thanks again.

View solution in original post

9 REPLIES 9
TakaYokoo
New Member

I identified this topic today after encountering a similar issue. I successfully resolved it by manually editing one of the control JSON files. As a result, my application can now utilise PowerBIIntegration.Refresh() with Tablet layout.

  1. Download a copy of your App
  2. Change file extention from ".msapp" to ".zip"
  3. Open the zip file, find & copy "1.json" (in Controls folder) to your local pc 
  4. Open your local 1.json and locate section similar to below

 

        "Type": "ControlInfo",
        "Name": "PowerBIIntegration",
        "HasDynamicProperties": false,
        "Template": {
          "Id": "http://microsoft.com/appmagic/hostcontrol",
          "Version": "1.6.0",
          "LastModifiedTimestamp": "0",
          "Name": "hostControl",
          "FirstParty": true,
          "IsPremiumPcfControl": false,
          "IsCustomGroupControlTemplate": false,
          "CustomGroupControlTemplateName": "",
          "IsComponentDefinition": false,
          "HostType": "Dynamic",​

 

  • Add HostService section below

 

          "HostService": {
            "Type": "ServiceInfo",
            "Name": "PowerBIIntegration",
            "ServiceKind": "HostWadl",
            "WadlMetadata": {
              "WadlXml": "<application xmlns:xml=\"http://www.w3.org/XML/1998/namespace\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:service=\"https://powerbi.com\" xmlns:siena=\"http://schemas.microsoft.com/MicrosoftProjectSiena/WADL/2014/11\" siena:serviceId=\"PowerBI\" xmlns=\"http://wadl.dev.java.net/2009/02\">\n                    <doc title=\"PowerApps integration\" />\n                    <resources base=\"https://powerbi.com\">\n                        <resource path=\"/triggers/refresh\">\n                            <method siena:requiresAuthentication=\"false\" name=\"POST\" id=\"Refresh\" siena:isHostFunction=\"true\">\n                                <doc title=\"Triggers a refresh of the PowerBI Report.\" />\n                                <request>\n                                    <param style=\"query\" name=\"api-version\" type=\"xs:string\" required=\"true\" fixed=\"2015-02-01-preview\">\n                                        <doc title=\"The api version\" />\n                                    </param>\n                                    <representation mediaType=\"application/json\" />\n                                </request>\n                            </method>\n                        </resource>\n                    </resources>\n                </application>"
            }
          },​

 

  • Replace original "1.json" with editied 1.json using 7-Zip or WinRAR
  • Change extension back to ".msapp"
  • Import App

You Sir, are a hero.


I found that changing the .msapp file to .zip then back again breaks the file and it cannot be imported back again. What worked for me was opening the .msapp file with WinRAR, then opening and editing the 1.json file from WINRAR

lbendlin
Super User
Super User

There is no workaround, you need to start over.

@lbendlin 

Thanks mate. I was hoping for a better outcome - not to be.

 

Seems this should be something that MS could look at fixing though, it's been an idea for 4+ years now. My current 'workaround' is for users to reload their browser to see their new data, ie

 

1. user clicks company logo, triggers a bookmark that displays the app

2. user makes edits / adds new data and submit form/s

3. user clicks bookmark icon to 'go back to report' / hide app

4. user reloads their browser to see new data

 

Not ideal but works.

 

Thanks again.

If it's any consolation - once you started over and connect to a SQL server table in Direct Query mode you can make this a nearly seemless experience for your users. Push the PowerApps button which writes the user comments to the SQL table and then issues a Powr BI refresh which surprisingly works despite fact that the data source is direct query, and a couple seconds later the user has visual confirmation of the changes they just made.

 

What we really need is CDC  - the ability to write into the dataset that is currently in memory, and at the same time to write back into the data source. It can be done - other BI vendors have shown that.

@lbendlin 

I think that refresh can only be seen if I turn on auto page refresh - is that correct? I don't see minor changes comeing through from SQL to the report unless I reload my browser page.

 

Yes, CDC would be nice - or something similar. I'm catching up with a MS rep next week on another matter and maybe I can convince them to have another look at this? Wait and see what comes of that meeting I guess 🙂 

No, auto page refresh is not required. I was surprised to see that as it wasn't what I had expected. The powerbiintegration.refresh request not only triggers a dataset refresh but also a rerendering of the page the PowerApp visual is on - which results in a new query against the Direct Query source. At least that's my theory.

@lbendlin 

Ahh, sorry, I just re-read you last post. You were saying that '... once you started over ...', meaning once I rebuilt the app. I was thinking you were seeing this behaviour with an app built in a similar way to the way I built mine. All good - got it now haha

 

And yes, that's my understanding of PowerBIIntegration.Refresh() - it refreshes the data source and the browser instance. I think those vendors you mention may have used Javascript to mimic the refresh behaviour? I might see if I can work out how they did this - can't be too hard ... surely lol

And yes, that's my understanding of PowerBIIntegration.Refresh() - it refreshes the data source and the browser instance

That's not exactly what I said.  It does not refresh the data source. It triggers a dataset refresh request.  There's a (big) difference.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors