Allow Multiple Power Apps Developers To Simultaneously Edit Canvas Apps

Allow Multiple Power Apps Developers To Simultaneously Edit Canvas Apps

Multiple Power Apps developers can now work together on the same canvas app and see each other’s changes! This is an exciting new feature Power Apps developers have wanted for a long time. We can open the same app as another developer without seeing a locked for editing message and we no longer need to create multiple copies of an app during development. In this article I provide step-by-step instructions for setting co-authoring for canvas apps and explain the new concepts you’ll need to know including: git, Github, version control and repositories.

If you prefer to use Azure Dev Ops instead of Github I have written another version of this tutorial for Azure Dev Ops.

Table Of Contents:
• IntroductionWhat Is Git And How Does It Provide Version Control?Enable Collaboration With Git Version ControlConnect Power Apps to A Git RepositoryChoosing A Git Repository HostSign Up For A Free Github AccountCreate A New Repository In GithubInput Github Repository Information In Power AppsCreate A Personal Access TokenSign In To The Github RepositoryFinish Git Version Control SetupSharing Power Apps With Another Developer As A Co-OwnerLogin To A Power Apps App At The Same Time As Another DeveloperCommit Changes And Check For UpdatesView Power Apps Source Code In A GitHub RepositoryAdditional Considerations For Power Apps Co-Authoring




Introduction

With Power Apps multiple developers can work on an app at the same time to speed up the development process. Here’s what collaboration between two developers looks like in Power Apps.

Both developers in the example below have the same app open. The 1st developer on the left side adds a titlebar to the screen and some text. Then the 1st developer presses the sync button to save and commit the changes. The 2nd developer on the right-side wants to see the changes made by the 1st developer. So the 2nd developer also presses the sync button and the titlebar & text appear.




What Is Git And How Does It Provide Version Control?

For multiple developers to collaborate in Power Apps the experimental Git Version Control setting must be turned on. Git is a tool software developers use for version control – a way to track who made what changes to an app and when. It also allows developers who are working on their own instance of the app the ability to merge their code with one another. If an issue arises with the app’s code, the developers can use Git to compare the changes between each app version and revert to a previous one.




Enable Collaboration With Git Version Control

If more than one developer tries to open the same app the message “Power Apps is locked for editing. Contact the user or wait for them to close the app” will appear.



When Git version control is enabled multiple developers can work on the same app and the locked for editing message will no longer appear. How is this made possible? Power Apps opens a separate instance of the app in Studio Mode for each developer. Each time a developer saves their work it gets committed (i.e. saved) to a shared Git repository (a folder). Saving merges the new code with existing code in the repository contributed by other developers. Then the freshly merged code is downloaded into Power Apps Studio for the developer to continue working on.

Go to the Settings menu in Power Apps then browse to the Upcoming Features section. Look for the Show the Git version control setting in experimental features and turn it on.




Connect Power Apps to A Git Repository

Once the show the Git version control setting is switched we must connect Power Apps to a Git repository. Navigate to the Git Version Control section of the settings menu and select Connect.




A form appears asking for the Git repository URL, branch and directory name. To fill-in these fields, first we will need to create a Git repository. This is something done outside of Power Apps.




Choosing A Git Repository Host

Git is a generic tool and there are many online services that can host a git repository. Which host should you choose for Power Apps? I recommend these two services offered by Microsoft and each one has a free tier:

  • Github – the most popular open-source community in the world
  • Azure DevOps – a collaboration tool for developers which also includes git repositories

For this tutorial, we will use Github because it requires the least setup.

Important: If you choose an alternate service please note that Power Apps co-authoring does not support on-premise repositories at this time.




Sign Up For A Free Github Account

Go to Github.com and login to your account. If you don’t have a Github account you can sign up for free. We only require the free-tier to setup a git repository for multiple developers to collaborate in Power Apps.




Create A New Repository In Github

Next we create a new repository to hold our Power Apps app. On the Github homepage click the new repository button from the left-navigation menu.



Give the repository a name with no spaces: multiple-developer-canvas-app. Write a description of the repository and choose the Private repository option. A Private repository is only shared with people we choose. It is not discoverable or accessible by others on the internet. Click Create Repository when finished.



This screen appears with information on how to initialize the new repository. Power Apps will do this for us. Right now we only need the repository URL: https://github.com/matthewdevaney/multiple-developer-canvas.app.

Important: the extension .git should be excluded from the URL.




Input Github Repository Information In Power Apps

Switch back to Power Apps and fill-in the Connect a Git repository form with these values. Click apply when done.

FieldValue
Git repository URLhttps://github.com/matthewdevaney/mutliple-developer-canvas-app
Branchmain
Directory Nameapp



The Git repository URL is a web address we can type into to our web browser to view the repository. App is the name of the folder where our Power Apps source code will be stored. Power Apps does not allow the source code to be stored in the repository’s root folder.

Main is the name of the default development branch. In traditional software development branches (i.e. copies) of the app are made to work on specific features and then are merged back into the main branch once the feature is complete. Power Apps only operates on the main branch.




Create A Personal Access Token

A special type of password called a personal access token is required for Power Apps to sign into the Github repository. One developer will make the personal access token and share it with the rest of the development team. We must go back into Github to create one.

Important: a personal account token is not your Github account password.



Open Github and click on the avatar in the top-right corner. Select Settings.



Scroll-down and choose Developer Settings from the left-menu.



Then select Personal Access Tokens from the left-menu on the next screen. Choose a Note (i.e. token name), an expiration and check the repo checkbox to give Power Apps full control over the repository.



Scroll to the bottom of the form and select Generate token.




Sign In To The Github Repository

Github will open to the Personal access tokens screen after clicking Generate token. Copy the personal access token to the clipboard.

Important: make sure you save the personal access token for future use. We can only see the token once. It will be needed each time any developer opens the app to make an edit.





Then go back to Power Apps and sign-in with your Github username and your personal access token for the password.




Finish Git Version Control Setup

Almost done. One more prompt appears asking if we want to create a new branch in the repository. Select Yes.



We have now setup Git Version control setup in Power Apps.




Sharing Power Apps With Another Developer As A Co-Owner

With git version control now setup multiple developers can now work on the same Power Apps app. But we still have to share the app and the Github repository with those developers. Go-to make.powerapps.com, browse to the app we connected to Github, click on the three dots and select Share.



Search for the other developers you want to give access to app and click the checkbox to make them co-owners. Select Share when done.




Login To A Power Apps App At The Same Time As Another Developer

Multiple developers can now work on a single Power Apps at once. Let’s test the feature to ensure it is working. Ask the developer you shared the app with to open it in Power Apps Studio while we are logged-in.



The 2nd developer will be prompted to sign into the Github repository with a username and password.

  • Username – this is the developer’s Github account username, not their Power Apps user name. The developer will need to sign-up for an account if they don’t already have one.
  • Password – this is the personal access token we previously created, not the developer’s Github account password.

Once completed Power Apps will open normally.




Commit Changes And Check For Updates

Both developers are now working inside the same app. How can they view each other’s progress? Power Apps does not have a live-editing feature like Word, Excel or PowerPoint Online. Developers must save and sync their changes manually. This serves a purpose – we do not want to push unfinished code onto the other developers screen and cause errors.

When have completed a feature we want to push it the the git repository so the other developer can update their instance of the app. To do this press the sync button on the top menu of Power Apps Studio. Doing this commits our changes to the repo, merges them with the existing code and updates our app to show any changes done by other developers.

Important: If two developers work on the same property of a control the last edit made wins. The older change gets replaced by the newer change. We need to plan in advance who is working on which features/sections of the app to ensure we don’t overwrite each others work.



Here’s what the save & sync looks like for two developers working on the same app.




View Power Apps Source Code In A GitHub Repository

After Power Apps Studio syncs the app to repository we can go view the source code in Github. Go the folder multiple-developer-canvas-app/app/Src and select the yaml file for the screen we edited in Power Apps. All code for the screen, its controls and their properties is found here.



We can do some very useful things with the Power Apps source code in Github:

  • Quickly conduct a code review – it is easier to review all of the code for a screen in Github than to browse each individual control and their properties in Power Apps
  • Edit the raw code – if we press the period key (.) while looking at the screen in Github it will open the yaml file in an online Visual Studio Code editor. Once any updates are made we can press the sync button in Power Apps Studio to see the changes
  • Rename Variables/Collections – Visual Studio code has the ability to find and replace text across all files and folders. This makes it easy to rename variables and collections for the entire app. Press the key combination CTRL + SHIFT + F to use the Find and Replace In Files feature.
  • For more ideas on what we can do with Power Apps in the Visual Studio Code editor check out this article.




Additional Considerations For Power Apps Co-Authoring

There are few more things you should know about Power Apps co-authoring before using it:

  • This is an experimental feature and it should be treated as such. Do not use it in a production app until you are sure it works. It is not the final product and more features/changes will be made before co-authoring is made generally available.
  • New Power Apps must be setup for collaboration individually. There is no way to enable a global setting for all apps to allow multiple developers working at the same time.
  • An app connected to git cannot be disconnected from it currently. The only option is to remove the git repository.
  • There no setting is available to restrict a personal token’s access to a single repository. Once a personal access token is granted it gives access to all repositories under the same account. Each developer must use the same personal access token.





Questions?

If you have any questions about Allow Multiple Power Apps Developers To Simultaneously Work On An App please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Matthew Devaney

Subscribe
Notify of
guest

39 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Reiner Knudsen
Reiner Knudsen
2 years ago

Could it be that you must disable 2FA at GitHub? Did you run into issues with that?
I tried logging in to my GitHub account from PowerApps and could only do so after I disabled 2FA.

Krishna Rachakonda
Krishna Rachakonda
2 years ago

Thank you for posting this detailed steps. Very useful.

Minte
Minte
2 years ago

Thank you for the self explanatory and detailed explanation. Can’t wait to check it out.

Michael Colbert
Michael Colbert
2 years ago

Matthew,

Another excellent step by step article. I was very excited to try this out, so this am I created a new Power App, enabled the Github option, created the repository, then went back to PA to connect. Entered the parameters for the repository, I saw the message about the branch but then also got a message about the directory not existing.

“That directory was not found in your branch. Please verify the directory and try again. If you want to create a new directory, save this app and try again.”

Went back into github and added the app directory. Tried again, now I no longer get the messages. Entered my userid and token, it accepts it just fine, but the settings screen never shows its connected to github. Any thoughts?

I then tried connecting to the master branch and this time I got a message about creating the folder which it did and connected fine.

Also, I noticed that synch button was not available until I published the app at least once. Is this a thing or something odd in my environment.

One last item, does this work with other solution components like Power Automate flows?

Thanks again for your commitment to this community.

Reiner
Reiner
2 years ago

The first thing is what Matthew meant when he said that the branch and the app will be created for you if they don’t exist. It worked fine for me just entering basically any value into the two fields.

The thing with publishing first I also noticed. A second person could only access the PowerApp once I had published it AFTER setting up the GitHub connection so I reckon that’s the thing to do.

R3dKap
2 years ago

Really nice article there Matt!!! 👍

I’d have two questions:

  1. Do the other developers need to be added manually to the Github repository as well or do we just share with them the personal access token?
  2. Isn’t it risky to put the “source code” of customers’ applications on Github for development purposes?
Leonard Davis
Leonard Davis
2 years ago

Hello Matthew, great article. this is something we been looking for a long time. We wanted to use Azure DevOps with this solution but it is failing when we try to authenticate with username/Password. We also tied PAT and it failed as well. Does this solution works with Azure DevOps or will we need to wait a little while longer? Thanks again for post this article.

Leonard Davis
Leonard Davis
2 years ago

Hi Matthew, thanks for the quick response. the Error I am getting is invalid logon or password. We are using MFA and that might be the issue.

Daniel Westerdale
Daniel Westerdale
2 years ago

Matt. This is a really useful & detailed article. I tried this with a colleague on Friday and ran into a few issues. 1) I see from your article that it was a mistake asking them to create their own PAT. Instead I just need to forward my PAT to them which they can use to login to the repo with their own Git handle. 2) If you decide to disable the co-authoring in the settings ( save + publish), you still get prompted for the credentials. I guess I now need unpack the Power App and remove the code linking the repo. 3) in the case of enterprise GitHub, in our org, I find there is a policy blocking direct updates to any main branch. I wonder if there is a way around this?

Daniel Westerdale
Daniel Westerdale
2 years ago

Matt, thank you so much for those detailed answers. I will follow up on your suggestions. Daniel

Daniel Westerdale
Daniel Westerdale
2 years ago

Is the Power Apps team close to releasing disabling the co-authoring GitHub feature after it is enabled in a canvass app? For my client this a roadblock to wider adoption amongst the various dev teams.

Richard Sunderland
Richard Sunderland
2 years ago

Daniel, exporting the app and re-importing as a ‘new’ app seems to remove the co-authoring/git connection.

Daniel Westerdale
Daniel Westerdale
2 years ago

Thanks Richard, I will try out your suggestion.

Daniel Westerdale
Daniel Westerdale
2 years ago

I think the non main branch co-authoring could be working. Came as a bit of shock when the copy of an app ( with the git enabled) , started updating the original copy edited by a team member!. I could do with removing the connection to Git on both apps, either on the App side or the backend Git . Just add to this, I can’t export the app as this is a could not find flow error: ……
I guess there in no way to remove the git connection in VSCode with the PowerPlatform CLI?

Last edited 2 years ago by Daniel Westerdale
Richard Sunderland
Richard Sunderland
2 years ago

Thanks for yet another very clear and detailed blog post!

I’ve tested this with a colleague using DevOps and we ran into a few problems after a couple of syncs: duplicated screens were OK, but the in source screen (that one that had been ‘duplicated’), all the galleries, buttons and textboxes had disappeared!; text boxes and combo boxes in galleries stopped resolving their items – the items and connections were still there but ThisItem.Title (for example) didn’t show anything; components from Component Library just disappeared, so no header…

I’m wondering if it is a cross-tenant thing, as I’m using *my* DevOps (on my tenant) with a PowerApp in a solution in a dev environment on a different tenant.

Anyway, glad I tested it out because it seems there is no way yet of reversing it once you’ve set it up on an app, except deleting the app. I’ll do further testing on a single tenant, and maybe just the Default environment, because this is [potentially] a massively useful feature!

Jay Soomal
Jay Soomal
2 years ago

Great article Matthew. I am really interested in the AzureDevOps option. Will you be posting a tutorial soon cover the steps with this option?

Lewis Lawton
Lewis Lawton
2 years ago

Hi Matthew,

Great article, really easy to follow for such a long-awaited feature in PowerApps!

My only question is surrounding PowerApps canvas apps which are powered through SharePoint forms. Is it possible to work on these collaboratively in the same way?

I can set up everything listed in this article, however when I attempt to share the app with a potential co-author the option is not available and greyed out. When I hover over the share button I receive the tooltip:

“To share your list and form, go to SharePoint Online”

I understand that there are very slight differences between these SharePoint generated forms and regular Canvas Apps (e.g., not stored in the same place as other Canvas Apps) so I wouldn’t be surprised if this just simply can’t be done.

Just wondering if you had any wisdom on the matter!

Thanks,

Lewis

Dayananthan
Dayananthan
2 years ago

Very good article with detailed explanation. Thanks Matt.

NSZA
2 years ago

Nice clear article Matthew. Do you know if anyone is actually using this successfully. The two times we tied it, we managed to get multiple people in the application, but then found that we are getting permission issues when people were trying to save/ sync saying that another user had locked the app for editing (as per the normal).
So we have not actually been able to get it to work in a practical sense. Just wondering if we are missing something.

Aedu
Aedu
2 years ago

The following scenario
We only have one account at a customer. However, 2 developers would like to develop a Canvas app with this account. Is this possible with the co-authoring feature?

Bruno Soares
Bruno Soares
1 year ago

Hi Matthew! Quick question, can this be applied also when the app is used/published? Ex. to avoid user A to use the app same time and overwrite what user B is working on?
Thanks!

IgorPK
1 year ago

Hi Matthew

I rarely comment on posts like these – but I take my hat off to you for these instructions – thanks to you I now have a PowerApp that has 7 collaborators on it.

You are a star, thank you very much!

Sidhant Dorge
Sidhant Dorge
11 months ago

Hi,
I had incorporated this co-authoring feature in one of my sample application and it worked fine. But later on when we tried to use this in one of the POC which involved 2 developers, initially we did not face any issue, but few days later we faced major issue which was data loss all the updates made till the day were not visible. When we tried restoring the version (to the previous), we were able to restore a version which was 3-4 days old (all the changes made between were not there).
So as you have mentioned in the post that we should not be using this in production as it is still in Experimental phase, is there any method through which we can have more than dev working on the same app simultaneously. I have posted a detailed description on this issue on the Microsoft Power Apps forum as well, but haven’t received any solution yet, if anyone has any idea please do comment on the same.

Forum Question Link:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Co-Authoring-Issue/m-p/2339502#M584267

Regards,
Sidhant.

richa Dhingra
richa Dhingra
5 months ago

I have tried this method this works when there is no component in the PowerApp. Once your app have components, it will stop working. Please suggest something to overcome this issue.

Giles
Giles
3 months ago

2 years later, still in preview 🙂

Is it possible to use this feature for repos in an organisational github account? Or only personal repos?