Co-authoring in canvas apps (experimental)

[This article is pre-release documentation and is subject to change.]

Important

  • This feature is being rolled out and depending on your region, it may not be available for your tenant yet. Check the experimental switch described in Enable Git version control to know if the feature is available in your tenant.
  • This is an experimental feature. It is disabled by default and must be enabled before use.
  • Experimental features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.

You can now use Git version control to enable more than one person to edit a canvas app at the same time. With this feature, others won't get locked out of the app while one person is editing it. As changes are made and synchronized, they're automatically merged with other changes, and made available to all others editing the app. This feature is a first step towards the Microsoft Office style of co-authoring experience for canvas apps.

Git is used as the backing store for this feature. After the initial setup with the connection to Git, any user can use this feature without any extra configuration steps except to authenticate with Git.

Any Git provider can be used with Power Apps Studio—such as GitHub or Azure DevOps. Use existing Git tools to see version history, create and manage pull requests, and do other version control tasks.

Note

  • Before you begin, ensure you read known limitations of this feature. Use of Git is evolving and may change how this feature works. For updates and to share your feedback about this feature, vist the Power Apps community forum.
  • Git version control is managed on a per-app basis. Each app must be individually added to Git version control.

Enable Git version control

Follow these steps to enable Git version control in your app.

  1. Create a new app or open an existing app that you would like to add to Git version control.

  2. Select Settings in Power Apps Studio.

  3. Select Upcoming features.

  4. Select Experimental.

  5. Scroll down to Show the Git version control setting and turn it to On.

  6. You'll see a new Git version control item on the left-hand side of the settings pane.

    Swtich to enable Git version control.

    Tip

    • This feature is being rolled out. If you don't see it in your tenant, it may not yet be deployed to your tenant yet. In that case, check again later.
    • For any other problem with this feature, visit the Power Apps community forum.

Connect an app to Git

Note

Once connected, the app can't be disconnected from Git currently. The option to disconnect is coming soon.

Follow these steps to connect your app to Git.

  1. Select Settings in Power Apps Studio.

  2. Select Git version control.

    Button to start a connection to git for this app.

  3. Select Connect, and fill-in Git connection information for this app.

    Text input boxes to provide git connection information.

    • Git Repository URL: The URL you would normally use with Git tools. For Azure DevOps, be sure to include the _git/repo portion of the URL, such as https://contoso.visualstudio.com/_git/repo.
    • Branch: The branch name to use.
    • Directory: The directory within the branch to use. You can't store a canvas app at the root of the branch.

    You'll be prompted to create the branch or directory if it doesn't exist. If the branch and directory already contains a canvas app, the current app will be closed and the existing app will be loaded from Git.

    Once connected, the connection information will be displayed.

Authenticate with Git

Power Apps requires you to use a personal access token instead of your version control provider account password.

Note

A personal access token is not the same as your password, either for Power Apps or for your Git provider. You must create a personal access token to use this feature.

Different version control providers have different methods to generate personal access tokens. Follow below instructions to obtain personal access token.

While editing apps connected to Git, you're prompted for username and password. Enter your username and the access token in this dialog to authenticate with Git.

Dialog asks for Git username and access token (as password).

Note

Git credentials are not stored by Power Apps between sessions. If you want, you can use browser settings to save form information for reuse to avoid entering credentials frequently.

Make changes to the app

After an app is connected to Git, all you have to do is authenticate with Git credentials to open and edit the app. You don't need to go through Git concepts when using this feature to load, edit, save, publish, and share the app.

Use the new synchronize button at the top of the Studio screen (between the App Checker and Undo buttons) to merge any current changes with what's in Git, and to bring the result into Studio for further editing.

Button to synchronize changes with the Git repo.

Important

The app will need to be loaded each time there is a merge. If the app is large, this load could take some time.

After being connected to Git, changes are stored in Git rather than in Power Apps. Unpublished versions won't appear in the Power Apps maker portal.

Merge results

There's no option to resolve merge conflicts currently. Studio will attempt to merge and fix conflicts automatically through semantic knowledge of the app (for example, the types of objects and other app changes). Since all changes are still stored in Git, you can always retrieve the app changes to reapply if automatic merge doesn't meet your business requirement.

Publish the app

Apps connected to Git continue to work normally for publishing and user experience with no changes to this process. When you publish an app, the app version is stored in Power Apps since Power Apps needs a runnable copy of the app to share with users.

Pull requests, viewing history, blaming, and other Git features

Working with pull requests or any other Git operations must be done through other Git tools, including the Git provider's website. There's no option available to perform such Git operations to pull or push commits.

Each save or synchronize that includes changes will result in a commit in Git. If other changes occurred in Git, for example by other makers, then there will be additional commits made in order to merge the results of all the changes. No changes will be lost, even if a merge would override an edit. Changes by each maker are stored in Git through commits.

Known limitations

Since this feature is experimental, we welcome your feedback. The following lists known limitations. We plan to remove most of these limitations in future versions.

  1. This feature isn't compatible with code components. Don't use this feature with apps that make of use of code components.
  2. This feature doesn't work with public Git repository. Use a private repo instead.
  3. 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.
  4. Edits to the same property on the same control aren't merged. The last edit made will win.

Feedback to the community forum

Let us know what you think! This feature is a first step in a long journey to enable a great team development experience. Visit the Power Apps community forum for updates and to provide feedback.