web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to select a specif...
Power Apps
Answered

How to select a specific connection reference when adding a data source ?

(0) ShareShare
ReportReport
Posted on by 13

Dear community, we have several solutions in our environment. Apps within solutions tend to automatically point to other solution's connection references. We setup deployment pipelines with a build environment, but now we end up with lots of duplicate connection references.

 

In order to make our solutions independent from each other, we would like to create the connection references inside each solution. We are able to create those connection references in a solution but how can we modify the apps to use those new references ? Is there an advanced view somewhere?

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,129 Most Valuable Professional on at

    per the documentation here:  Use a connection reference in a solution - Power Apps | Microsoft Learn

    For canvas apps you need to remove the connection.  You can then add the new connection to the Power App using the connection reference.

    • Connection references get associated with canvas apps only at the time a data source is added to the app. To upgrade apps you must remove the connection from the app and then add a connection containing an associated connection reference.
  • MartiB Profile Picture
    13 on at

    In the app, I removed the SQL connection and then added it again. Unfortunately, the user interface only shows the list of connectors in the environment, not the list of connection references. I selected the connector, then  a table, finished the wizard and saved. If I then import the required objects from the app contextual menu, it keeps on re-adding the same existing connection reference from another solution, disregarding the one I created myself. 

  • Pstork1 Profile Picture
    69,129 Most Valuable Professional on at

    Connection References for apps are only supported for implicit connections, like SQL server using SQL Authentication.  If you imported the app into the solution you have to delete the connection from the data sources panel in the app and then create a new connection.  If its an implicit connection it will create a connection reference in the solution.

  • MartiB Profile Picture
    13 on at

    I am using a SQL server connection with Windows authentication. Are you suggesting to create a new connection (so from the app user interface, but in fact resulting into another connection at the environment level) for each solution ? I then have several time the same connection to the same SQL server in my environment. I was looking for a method to use one connection at the environment level in all the solutions, with one reference to that connection per solution.

  • Verified answer
    Pstork1 Profile Picture
    69,129 Most Valuable Professional on at

    SQL connections with Windows Auth are implicit.  So if you created the app outside a solution and imported it into a solution you need to delete the existing connection in the app and create a new one.  Doing that will create a new connection at the environment level, but it will also create a connection reference in the solution. Once the connection reference is created you can point it at a different connection by editing the connection reference in the solution. After that you can delete the connection that was made at the environment level because it will no longer be used by anything.  If the app was originally built in a solution it would have created a connection reference in the solution when the original connection was made.  For Canvas apps there is no way to select a connection reference. It generates one when you create the connection on a solution aware app if the connection is implicit.  There is no way to use connection references on explicit connections in power apps.

  • MartiB Profile Picture
    13 on at

    This is a great work around. I will try it soon: create the connection again so that I get a new connection reference. And then switch the reference to the old connection and remove the temporary connection.

     

    Thank you!

  • Baudelaire Profile Picture
    110 on at

    This is a confusing thread to follow - no matter what the question, the same answer.  Who's on first?  What's on second? 🙂  I have tried this a dozen times, which seems contrary to the above repeated answers - With a canvas app inside a solution, I add a SQL connection, using implicit SQL Server authentication, and use the connection in a gallery, for example.  Save.  Go out and there are NO connection references.  I can create a connection reference manually, pointing it to the existing SQL connection above, and it saves fine.  Then I can reference that in a flow...and even add the flow to the app.  If you look at the dependencies of the connection reference, it only shows the flow, not the app, even if the flow is inside of the app context.  So to say that canvas apps using implicit connections to SQL use connection reference appears to be false.  If you can explain otherwise I welcome the correction.

  • Pstork1 Profile Picture
    69,129 Most Valuable Professional on at

    See the note in this documentation

    Use a connection reference in a solution - Power Apps | Microsoft Learn

    • Canvas apps and flows handle connections differently. Flows use connection references for all connectors, whereas canvas apps only use them for implicitly shared (non-OAuth) connections, such as SQL Server Authentication. More information: Security and types of authentication
    • A connection reference is automatically created when you create new connections from the flow and canvas app designers.
    • Canvas apps and flows added from outside solutions will not automatically be upgraded to use connection references.
    • Connection references get associated with canvas apps only at the time a data source is added to the app. To upgrade apps you must remove the connection from the app and then add a connection containing an associated connection reference.

    I agree its confusing with Canvas apps and I can't explain what you are seeing in your setup. But in my testing if I create a Canvas app in a solution and add a SQL connection with SQL authentication to the app as a Data Source it will create a Connection reference in the solution. Connection references are only created for SQL implicit shared connections which is dependent on the authentication used. I also haven't checked this since the new Secure connections switch was introduced in Settings. That is enabled by default now and may be causing what you are experiencing.

  • rb Profile Picture
    835 Super User 2024 Season 1 on at

    I have in the past, and more recently, battled with a similar problem where trying to ensure PowerApps in different solutions but using the same connection still have their own Connection References. It seemed that in the background, PowerApps would see an existing Connection Reference in a different Solution and decide to use that one instead.

     

    Today I found a way to prevent these annoying cross dependencies, but more generally it is a method to 'force PowerApps to use a specific Connection Reference', so you might be able to use the same technique. See my post here: https://powerusers.microsoft.com/t5/Building-Power-Apps/Change-PowerApps-Connection-Reference/m-p/2369349/highlight/true#M591681 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard