cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattStannett
Frequent Visitor

Unable to add SQL Server connection to imported app inside a Managed Solution

I have two PowerApps environments:

 

  • Test (where application development is done)
  • Production (where applications are published for consumption)

 

I have created an PowerApps Solution inside my Test environment which includes the following:

  • 1 Canvas App
  • ~10 Power Automate Flows

My App and the Power Automate Flows use the SQL Server connector to interact with an Azure SQL Database and the Office 365 Users connector. Now that I am happy with the functionality of my App, I would like to migrate it from my Test environment to my Production environment. According to the documentation (export and import) this should simply be a matter of exporting my Solution from the Test environment (as a Managed Solution), then importing it to the Production environment. Step 6 of this documentation states:

 

If your solution contains connection references, you’ll be prompted to select the connections you want. If a connection does not already exist, create a new one. Click Next.

 

I have tried creating the required Azure SQL Database connections during the import and after the import but neither seems to work because when I try to edit or run the App inside the imported solution I am presented with a permission dialog where the "Allow" option is disabled.

MattStannett_0-1602808799778.png

 

What I have tried:

  • Signing out, then back in
  • Clearing my browser cache
  • Different browsers (IE, Chrome, Firefox, Edge)
  • Creating the connections during the import process
  • Creating the connections after the import process
  • Waiting overnight
  • Created an App with a data table that is bound to a table in Azure SQL DB and importing that (same issue)
    • Minimum reproducible example
  • Migrating an App from Test to Production (same issue)
  • Migrating an App from Production to Test (same issue)
  • Ensuring that I can connect to the Azure SQL DB in both environments by making test apps that use the created connections
  • Ensuring that the account I am signed in with has the Owner permission for the connection
  • Launching the App in Edit mode
  • Launching the App in Run mode
  • Inspecting the XML inside the files shipped as part of the Managed Solution

 

The weird thing is that a few weeks ago I successfully imported a Solution from my Test environment to my Production environment and didn't have any issues.

 

Any suggestions would be appreciated because I'm out of ideas.

2 REPLIES 2
swatibece
Regular Visitor

Hi MattStannet,

Is your issue resolved ? Can you suggest me how to solve the issue ? I am getting the exact same issue.

Thanks in advance!

Hi @swatibece.

I reached out to the Power Apps support team and got the following response, after completing the steps everything worked as expected.

There is a possibility that you forgot to save the app after you re-added the connections last time. Hence the old connections are still there in the backend and that prompts the message.

Therefore, could you please follow these steps and let me know the result?

  1. Go to edit mode of the app and delete the SQL Server connections
  2. Save and Publish the app
  3. Go back to Power Apps portal and refresh the page
  4. Go to edit mode of the app and add the connections again
  5. Save and Publish the app


I believe the "secret sauce" was the saving and publishing of the app without the connection, before re-adding the connection - I was doing the remove and re-add at the same time, then publishing.

 

I hope this helps.

 

Cheers,

 

Matt

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,243)