Golf Course Trees
Detect and Notify when Power Apps and Flows are Created
July 13, 2022
Power Platform ALM- Part 1: Choose the right approach!
January 26, 2023

The Microsoft Connection Reference documentation makes it clear that only non-OAUTH connections Connection References may be used in Canvas apps. (see below).

This made me wonder if more types of Connections would support Connection References in the future. For example, right now, you cannot use a Connection Reference for a SharePoint Connection directly from a Canvas Power App. But, you can invoke a Flow from a Canvas Power App, and in the Flow you can use a Connection Reference for the SharePoint Connection.

With all the work I do with Power Platform ALM in Azure DevOps pipelines with settings.json files, I was wondering if I could automate the setting of ALL the Connections in a Canvas Power App in the future.

I reached out to my buddy Casey Burke at Microsoft to learn more about it, and he shared some very helpful information about Connections and Connection References for many different scenarios.

This information was so helpful that I asked Casey if I could share it with the world and he said go for it. So…here it is. Thanks, Casey! Enjoy!

  1. Standalone Canvas apps intentionally don’t use or need Connection References for personal connections (ie: oAuth based). Every user that plays the Power App creates their own personal connection the first time the run the Power App. These personal connections are not part of the Power App customization & are not needed until runtime. Therefore, it wouldn’t make sense or add value to bind the app to any singular connection during an ALM process. However, shared connections use Connection References because that connection is single-bound, and the same Connection is shared and used by all users of the Power App. They participate in ALM so they’re setup ahead of time for end users. Also, this allows you to use two+ different SQL connections in the same Power App & keep separate Connections for the same Connector in each environment.
  1. Standalone (automated) flows do not have a runtime interface like Power App do. There’s not an interactive user to authenticate connections while running the Flow. Unlike canvas Power Apps, these Flows run under a single connection (per action) – even if the Flow is shared. This is single bound and more similar to shared connections with Canvas Power App.
  1. Flows triggered from Canvas Power Apps do have an interactive user & the user’s own (personal / oAuth) Connections are used to run the Flow. Ideally these wouldn’t require Connection References either, but they do currently because Connections are needed to validate and activate the Flow. This activation must happen before runtime. But they’re not typically used after that because each user’s personal Connection will be passed from Canvas runtime to run the Flow. Note that the Connections mapped to the Connection Reference are actually used if the Flow is run manually from the Flow portal.