Recently Microsoft added the option to use Co-Authoring as an experimental feature to Power Apps.
What is Co-Authoring?
Table of Contents
You might already be familiar with Co-Authoring in Microsoft Teams. Co-Authoring in teams lets you edit a document while another person is editing the same document.
With Power apps it is just the same. You can edit one app with multiple people at the same time.
Be aware though that enabling Co-authoring is more than just enabling a feature. When multiple people edit the same app, it is very important that you use the same standards and that you are aware of which parts each person is working on.
Saving your work on a regular basis, and collecting other people’s changes regularly might be a good idea.
Enabling the Show the Git version control setting feature
I will start this post by creating a new app. But you can do the same for any of your existing apps as well of course.
When you are looking for a Co-Authoring settings then you will not find it. Personally I find it a real shame that this feature is called the way it is. Hopefully it will be renamed to Enabled Co-Authoring soon.
Once you have enabled the above feature there will be an additional settings option where you can supply the git repository, the Branch and the Directory name
The Directory name should be specific to your app, so that you can handle multiple apps. Make sure that you don’t create this folder manually in your repository as Power apps will do all the work for you.
If you try to be helpful and create an empty folder then you will see the following error:
When you supply a non existing folder however you should be asked if you want to create the folder. Just click yes and all will be put in place.
Once you have supplied the repository details, you will be asked for a username and password.
Note that this password is not your password!!!
This is where you need to supply your Personal Access Token, aka PAT. You can create and collect a PAT from the DevOps interface as shown below.
Now we can save and publish the app and share the app with a colleague. But before I look at the actual Co-Authoring I will first have a look at my Repo.
But not just a folder was created. The whole export of the app is now in my repo:
Share the Co-Author app
So now I’m going to share the app just the same way as I did before when Co-authoring didn’t exist.
Where in the past you would get a message app is locked for editing by user like this:
The colleague will now see a dialog asking for a username and password.
This is another point where things potentially could go wrong. It is important that the users have been given the right permissions on the repository. In general I would recommend checking in DevOps as the user in question if they can see the repo or not.
Co-Authoring the app
Once the PAT has ben supplied, the second author can now edit the app.
And as the first author makes an update (for example change the colour of a button)
So how does the second author get the changes made by the first author?
You might already have noticed the little refresh icon at the top. Directly next to the app checker.
Once that is pressed the changes will come through immediately.
After my second author has clicked on the refresh I’m going to have another look at the Repo. As you can see a SmartMerge has taken place.
Hi Pieter. One negative point here. It looks like every time I edit the app I have to supply the username/password to git UNLESS I memorize it in the browser with autofill. It seems as it does not remember the PAT
Hi Jon, yes indeed. Hopefully that will get addressed soon.
Hi pieter. Does the first author who creates the PAT, need to share the username and PAT with the other authors/makers or does each author need their own Pat?
Every user has their own PAT. When they open the app they will be asked to enter their own details.
Pieter thanks that makes more sense. One more thing, do you recommend a repo per PowerApp even though you have directory option ?
Personally I would organise my apps within solutions. Then you can have multiple apps in one solution.
then if you enable the co-authoring you would have the solutions in your repo and your apps in a single repo.
Thanks Pieter, the already named folder and Azure Dev Ops token generation snapshots were very useful. One thing me and my colleague have noticed, occasionally it kicks off the other co-author in the middle of making changes and returns the old locked for editing message, has anybody else witnessed this?
Hi Adam, I have not seen that. If it is something thatvuou can reproduce and record then I would be interested to see that.
Sure Pieter. If it happens again we will try and capture it. Another issue we had today, we applied a custom property (of type number) to a component and then committed the change and synced and it caused the app to crash and not be able to open in edit mode for either user. The error message was “Error PA3004: Unsupported operation error. This tool currently does not support adding new custom properties to components. Please use Power Apps Studio to edit component definitions.” The hilarious thing is it would not allow us to edit and change/repair the issue and the normal restore functionality wouldn’t work either. To resolve the issue I had to go to Azure Dev Ops and in the Repos identify the troublesome commit and open it up and select the “Revert” option. Only then were we able to re-access the edit functionality. I double checked the documentation for known limitations and it mentions that code components are not supported but I couldn’t find any clarification on component custom properties being an issue.
Thanks Adam,
I’ve submitted a documentation update, which is now pending approval.
Yes, occasionally it is absolutely impossible to login for any more editors than the first one. Even the colleague does not reach to the login screen. The old lock screen is displayed before he can login. We have turned off that feature.
Hi Pieter. Does this feature multiple developers at the same time apply also for a custom page in model-driven app?
The feature described is just Canvas apps.