Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Injecting updated JSON into msapp without error

I am attempting to:

  • unpackage an exported .msaap file,
  • edit the "2.json" file (the content of the app itself) in the "Controls" folder (I find and replace of a lot of variables),
  • and then repackage the .msaap and upload it.


This doesn't work.  The app will open, but the canvas is blank.


Re-exporting the broken app and examining the .msaap file shows that the "2.json" file is now missing but the other files are just fine, as if the "2.json" files was stripped out during the upload/opening process in the PowerApps web interface.


In an attempt to solve the problem, I modifed file attribute flags in the .msaap file (which is just a .zip file), such as the "A" archive bit, and the Created and Accessed attributes.  The same error resulted.


Does anyone know how to edit the "2.json" file and successfully repackage to a working app?


It would save me literally dozens of hours...



Not applicable

@JamesA , sorry to hear that did not work for you.  

I haven't yet tried to edit any of the files and place them back in the zip/msapp, so perhaps this wouldn't work for me either.  In the past this was simple.


In actuality it is a shame that we even NEED to do this since PowerApps messes up code so badly it puts your app in these states.  


As mentioned earlier, I had to ENTIRELY rebuild my app from scratch (meaning create new app and then cut/paste, and modify everything in it from an older app) in order to get things to work.  Most of the Width and X values (especially) and many of the Y and Height values for MOST of the controls were wiped out when importing components as well as cutting and pasting the controls between apps (or even within the same app).  These appear to be NEW bugs (or at least MUCH worse than in the past).


And code continually being automatically changed (formulas wiped out, even some static values changed at times, sometimes collection property accesses replaced with garbage, etc) is ridiculous.


Spent FOUR HOURS last night trying to recover from this type of stuff in order to otherwise fix a problem (mine) that should have taken 10 minutes.




Frequent Visitor

It's a big issue and it makes powerapps very frustrating to work within.  

@Anonymous  and @JamesA ,


Thanks so much for your efforts on this.  Two questions....since it's been a few months:


1) Have you had any success in getting direct-edits inside MSAPP files to be returneable to PApps and get a functioning app since July?


2) BrianR, you mentioned the muckups the PApps Studio does to existing/working formulas. 


"And code continually being automatically changed (formulas wiped out, even some static values changed at times, sometimes collection property accesses replaced with garbage, etc) is ridiculous."

I found this thread while looking to see if I was going crazy or if the Studio WAS wiping out stuff I coulda sworn I'd put it/changed. 


Are you aware of any official "issue" for this batty behavior having been raised with MSFT?


What I'm seeing far too often is I make a change to an existing formula (though I cannot be sure that that includes just creating a formula to replace the existing default) and click over to some other property or control.  When I come back to the original property's formula, it's reverted to an earlier if I never put my newer one there.  WTF!!


On a less important note:  VS Code is the "protective gear" one has to use when doing PApps (Studio), don't ya think? 🙂  Thank GOD for VS Code and Notepad++.....oh, and the ability to unzip MSAPPs so I can find stuff that is IMPOSSSIBLE to locate via Studio.

msapp modifications does not work.

1. Download package (let's call it

2. Unzip to another folder

3. Go to msapp file (let's call it N4d1dec0a-7dfc-41d3-a346-b61020c26449-document.msapp )

4. Unzip to another folder

5. Modify one existing label in file /Controls/1.json, for ex:

                "Type": "ControlInfo",
                "Name": "DataCardKey13",
                "Template": {
                  "Id": "",
                  "Version": "2.3.0",
                  "LastModifiedTimestamp": "0",
                  "Name": "label",
                  "FirstParty": true,
                  "IsCustomGroupControlTemplate": false,
                  "CustomGroupControlTemplateName": "",
                  "IsComponentDefinition": false,
                  "OverridableProperties": {}
                "Index": 0.0,
                "PublishOrderIndex": 40,
                "VariantName": "",
                "LayoutName": "horizontal",
                "MetaDataIDKey": "%FieldName.ID%",
                "PersistMetaDataIDKey": false,
                "IsFromScreenLayout": false,
                "StyleName": "accentLabelStyle",
                "Parent": "ProjectName_DataCard1",
                "IsDataControl": false,
                "IsGroupControl": false,
                "IsAutoGenerated": false,
                "Rules": [
                    "Property": "Live",
                    "Category": "Data",
                    "InvariantScript": "Live.Off"
                    "Property": "Role",
                    "Category": "Data",
                    "InvariantScript": "TextRole.Default"
                    "Property": "Text",
                    "Category": "Data",
                    "InvariantScript": "\"Nom de 123 l'affaire\""

I've added 123 in the middle of string.


6. Copy this file 1.json to the msapp archive file (use Total Commander, for example)

7. Copy msapp file (N4d1dec0a-7dfc-41d3-a346-b61020c26449-document.msapp) to the previously downloaded app (

8. Upload the app back - no errors, all fine.

9. Open the app for edit - WHOLE PAGE DISAPPEARED!






I can confirm the test from the last post. No modifications are possible. Wanted to do mass updates for a changing data source, but instead the whole page gets wiped 😞

Very sad about it. Use case is, customer has created app with over 1600 columns. As you might expect it is super slow and I want to change it to SharePoint while doing mass updates. But even with a small singe application it is not possible.

Still an issue as of October 2020. Trying to inject updated json files back to msapp file after updating reference to different SharePoint list as part of promoting the app from dev to prod environment. Anyone have a work around?

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,582)