As we know, one of the major limitations of PowerApps (Canvas mode) is that it does not allow multiple developers to work at the same time on the same app, but this Software as a Service (SaaS)-based app continues to supply new features and releases every year in April and October.
The PowerApps technical team provided the Git version control support in a 2021 release as an experimental feature. In this article, we will see how to use this Git version control feature on Azure Repos and Git Hub, as well as how developers can work concurrently on the same app.
Note: Do not try this feature if you already have an app that is going into production, as this is an experimental phase.
We’re going to cover both the Azure Repos and Git Hub in this blog. First, we’ll create a repository in Azure Repos and GitHub and generate the access token (GIT Hub). We will generate the credentials in Azure Repos.
Follow along with me as I explain the next steps.
Create the Repository in Azure Repos
You’ll start by logging in to Azure here. Then, you’ll go to Azure Repos and create a new repository. Copy the repository path and save it securely in a secure spot, such as Microsoft Notepad. This will be needed later. You’ll now click on Generate Git Credentials and save the repository path and credentials in Notepad for later use in PowerApps for Git version control configuration.
Create the Repository in GitHub
Log into GitHub here and save the repository path.
Now, in the top right corner, click on your profile icon and go to your settings. Once the settings page opens, scroll down and click on “Developer Settings.”
Click on “Developer Settings” and it will redirect to the GitHub App Page. From here, it will generate the access token.
Now click on “Personal Access Toke” and then click on “Generate New Token.” In the note, add information such as “what is this token for,” then choose end of token duration per need. In the “under scope” section, check the “Repos” option and scroll down to the button “Generate Token.” Click on it and save the token securely in your Notepad.
Enabling Your Git Version Control Settings in PowerApps
To enable Git Version control, go to “Settings.” In “Upcoming Features,” select the “Experimental” tab, and scroll down or simply search for Git. Turn the feature on once you see it.
Unleash the Potential of Power Platform With a Center of Excellence
Business innovation often comes from within. Discover how to empower innovation from non-traditional developers with the Microsoft Power Platform.
Click “Connect” once it’s turned on.
Now provide the Azure Repository path, branch name, and directory name (give any name to the directory) and click on “Apply.”
Here you need to add the repository username. Paste the Azure Credentials in the password that we saved in step one and then it will connect PowerApps with the Azure Repository.
All related configuration settings are done. Now share PowerApps with your co-developers who want to simultaneously work on the same application and check the “Co-Owner” permission.
If another user tries to log into the same PowerApps application, then it will prompt you to enter a username (the PowerApps username would work here) and password (If you are using GitHub then password would be access token) needs to be entered. You are ready to go can multiple developers work on the same app.
Once all settings have been done, then in the PowerApps ribbon you will see a new icon (commit) has been added.
Here in the below screenshot, I simultaneously logged in on the same app but with two different users.
If you look closely to the left side of the screen in “Navigation,” you’ll see the red-colored button. But it’s not on the right-hand side app. Once you save changes and click on the “Commit” icon, it will push changes into the repository.
Now if you click on the “Commit” button on the right-hand screen, then all the changes that were saved previously with other users will start reflecting.
Here we understood by enable Git Setting in PowerApps multiple developers could work on a same app on same time that would saves application development time.
Since this feature is experimental. The following lists known limitations.
- This feature isn’t compatible with code components.
- This feature doesn’t work with on-premises Git repositories.
- The Git repo must be hosted on the web and accessible with username and personal access token.
- Edits to the same property on the same control aren’t merged. The last edit made will win.
- Connecting multiple apps to the same git directory may cause problems.
Most awaited feature from PowerApps! well explained!
Having a Git repo is always useful, even though with limitations. Nice article Chetan.!