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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change PowerApps Conne...
Power Apps
Unanswered

Change PowerApps Connection Reference

(0) ShareShare
ReportReport
Posted on by 835 Super User 2024 Season 1

When authoring PowerApps inside solutions, if I add an SQL connection, then my app will become dependent on a Connection Reference pointing to that SQL Connection.

 

My question is how do I control the connection reference my PowerApp becomes dependent on? It seems that it will 'randomly' choose a Connection Reference in use by other solutions (or create a new one if it's a new Connection).

 

I am trying to achieve a result where Solutions can control their PowerApps connection references without any cross-solution dependencies. The only way I currently see is to create a Connection per-solution. However, I don't think I want, or should need, to create a new Connection.

 

With Power Automate flows, it's a very easy task. You can createa "Connection Reference" in your solution, then from the SQL activity in your Flow, choose the Connection Reference from the activity options.

Categories:
I have the same question (0)
  • Scott_Parker Profile Picture
    1,090 on at

    Edit: Forgot SQL connections use Connection References implicitly. Then, good question.

     

    Edit2: Overeager censorship algorithm... can't tell a verb from a noun.

     

    @metsshan wrote:

    When authoring PowerApps inside solutions, if I add an SQL connection, then my app will become dependent on a Connection Reference pointing to that SQL Connection.

    So, I'm questioning the premise of the question: I don't believe Power Apps use Connection References so they can't be dependent on them.

     

    Power Apps use the connections from the current user's Power Platform environment. When the Power App opens the first time, I suppose it randomly chooses from the available connections of the required type already existing in the environment (I personally have duplicate SharePoint connectors because I didn't **bleep** that problem in the bud...) or creates a new one.

     

    Custom Connectors created inside a solution are a different story, I believe. But I haven't played with those.

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

    Thanks for the confirmation, it is at least comforting to have the logic behind the question validated. I am just hopeful someone with the right knowledge might see this question!

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

    This came up again today, and I figured out a way to force my PowerApps to use the Connection Reference inside my solution, instead of 'randomly' choosing a CR using that Connection in another solution.

     

    The trick is to create a temporary Connection which you will delete after this procedure.

     

    1. Remove any Connection of this type from your PowerApps, and save your PowerApp
    2. Create a TEMPORARY Connection, a copy of your desired connection
    3. Update the connection reference in your Solution to use the TEMPORARY Connection
    4. Add the TEMPORARY Connection to your PowerApp, and Save your PowerApp
      (at this point PowerApps appears to 'choose' the Connection Reference in your Solution because it is the only one in the Environment using the TEMPORARY Connection as its value.)
    5. Update your Connection Reference to use the original Connection
    6. Delete TEMPORARY Connection

    metsshan_0-1695789125578.png

    metsshan_1-1695789148965.png

     

  • sperry1625 Profile Picture
    763 Super User 2024 Season 1 on at

    @metsshan this works for SQL Server. Any clue how to get a canvas app to use a Connection Reference for Office 365 Users?

     

    Thanks.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard