Co-authoring in Canvas Power Apps

Introduction

Co-Authoring with Git Version Control

Enable Git Version Control

Create a Personal Access Token

Working with Git

Summary

Introduction

While working with PowerApps, one of the biggest limitations had been that only one person could edit the application at a time. While working with large complex applications there would be situations where multiple app makers could work with different screens at the same time to complete the development faster. Let’s take a situation where a user tries to access an App that is being edited by another app maker, we will instantly get the below message that prevents us from opening the app for editing.

To overcome the Single user limitation, Microsoft has rolled out the Co-Authoring facility by which multiple users can now work on the same app at the same time. In this article, we will see how to implement Co-Authoring in Power Apps

Co Authoring with Git Version Control

We can now use Git Version Control so that multiple users can work on the canvas app, make edits to it, and sync changes in real-time. Users will not get the locked-out message if the App is being concurrently opened for editing. The changes made by the app makers are synchronized and made available for the other user in real-time. Git is used to enabling co-authoring features.

Note: Advanced Conflict resolution, say, for instance, changes made on the same control is not yet a feature that has been rolled out as part of co-authoring. Unrelated changes are merged automatically by the App Studio.

Before heading over to Enabling Git Version control, let’s create a Private repository in https://github.com/ and copy the URL of the repository as we would need it in the next step.

Clicking on Create repository will create the GitHub repo and the URL for the recently created repository is :

https://github.com/PriyaranjanKS/CoAuthorPowerApp

Enable Git Version Control

As the next step, let’s enable Git Version Control for the App. Let’s head over to an existing App, File->Settings->Upcoming features->Experimental, and toggle the Show the Git version control setting to On

Graphical user interface, application

Description automatically generated

This will add a new section for Git Version Control in the Settings window which lets you connect the App to Git.

Graphical user interface, application, Teams

Description automatically generated

Click on Connect to make the connection to the recently created GitHub repository. We will specify the URL of the repository, mention the branch name and the directory name where the app will be stored.

Graphical user interface, application

Description automatically generated

Clicking on Apply will ask for the authentication to the repo.

Graphical user interface, application

Description automatically generated

Create a Personal Access Token

Please note that the Password to be used here is not the password for the Github account, rather it is a Personal Access Token that you can generate from your logged-in Github session. Click on the Settings Menu from your account.

Graphical user interface, application, Word

Description automatically generated

From the left sidebar, select Developer Settings

Graphical user interface, text, application, email

Description automatically generated

Select Personal access tokens -> Generate new token

Graphical user interface, text, application

Description automatically generated

Specify the Token Name, expiration, and the permission scope that will be granted through this token. As we are using it to access to the repository, we will select the repo scope and click on Generate Token.

Graphical user interface, text, application, email

Description automatically generated

Save the token as it will not be available for viewing once you leave the page.

Graphical user interface, application

Description automatically generated with medium confidence

Let’s head back to the Power App and complete the authentication by placing the newly created Access Token in the password field.

Graphical user interface, application

Description automatically generated

In case the branch is not present in the repository, it will create a new one for use.

Graphical user interface, application

Description automatically generated

The same goes with the directory within the branch. If not found, a new one will be created.

Graphical user interface, application, Teams

Description automatically generated

Thus, we have completed the one-time setup of the App’s configuration and connection to GitHub

Graphical user interface, text, application, email

Description automatically generated

Heading back to the App, we can see that a new Sync icon has come up at the top of the app that lets you commit the changes and at the same time fetch the updates by another app maker from Git.

Graphical user interface, application

Description automatically generated

Working with Git

Let’s see how concurrent updates with an App works with multiple users. I have logged in to PowerApps under my account

Graphical user interface, application

Description automatically generated

Now let’s see what happens when a colleague of mine tries to edit the same app. It has not shown any locked out message but has asked for authentication to the git repository which we created.

Graphical user interface, application

Description automatically generated

Upon adding the username and personal access token, access to the app has been granted without any issues.

Graphical user interface, application

Description automatically generated

Now let’s try adding a simple update, by adding a new button and committing it by clicking on the sync button at the top right corner.

Graphical user interface, application

Description automatically generated

We will head over to the Concurrent app maker’s screen and try to fetch the updates by clicking on the same sync button.

Graphical user interface, application

Description automatically generated

You can now see that the newly added button has been fetched and shown in the concurrent app makers copy of the app as well

Graphical user interface, application

Description automatically generated

Heading over to GitHub, we can see that the directory has been populated with the App files in the main branch.

Graphical user interface, text, application, email

Description automatically generated

Summary

Thus we saw how we can implement the new co-authoring feature in Power Apps which is a great boon for multiple app makers who are working on the same app as it helps in better collaboration and faster app development.

Related Articles

Author

Author

Priyaranjan KS is a Modern Workplace Architect primarily focused on developing and architecting solutions around Office 365,Power Platform and Azure.He is also a Microsoft Most Valuable Professional(MVP) and a Microsoft Certified Trainer(MCT)

Latest Articles