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 / SQL Datasource Environ...
Power Apps
Answered

SQL Datasource Environment Variables - New Feature Feb 2025 - Solution will not Deploy

(2) ShareShare
ReportReport
Posted on by 53
Hi All,

I have recently switched a number of my existing SQL views and tables in a Power App to a different SQL connection.   I did this from within the App by removing the existing views and then simply re-adding the same views on the different connection.  The data all lined up correctly in my Dev Application and then I went to deploy to our Test Environment.

Upon deploying to test I was asked to set up 50  new environment variables that had automatically been created in the background, I was actually unaware this was going on due to it being a new feature in Power Apps and this is set to ON until you go into settings and switch it off.

I did a little research around this and found very little apart from the article in the link below:

SQL Server environment variables available for Power Apps - Microsoft Power Platform Blog.
 
Having read the article I took note of the following paragraph stating these new  SQL Data Source Environment Variables are specifically for Entra.
 
 Note that this feature is specifically for Entra. Power Apps with shared connections (e.g., SQL Auth) continue with connection references.

Since my application uses connection references, I went ahead and deleted the newly created Environment variables from the solution and then the Default Environment as I did not want any missing dependencies.

Upon clearing the solution and the default environment of these 50 or so Environment variables, I went to deploy the solution again and was faced with the following message when deploying the managed solution to the Test Environment.


Solution "NAME" failed to import: ImportAsHolding failed with exception :The dependent component EnvironmentVariableDefinition (Id=new_shared_sql_43df54881acf457b8d3628690a35fc9b) does not exist. Failure trying to associate it with CanvasApp (Id=CANVAS APP ID GUID) as a dependency. Missing dependency lookup type = EntityNameLookup.

Note: The Environment ID highlighted in the error message is one of the Automatically Created Environment Variables that I thought I had removed.

To test this I created an Environment variable with the same name and re did the deployment.

A similar error occurred but with a different GUID,    upon opening the solution Zip File from Initial deployment I can see all of these variables in the environment variables folder.

Interestingly: I also get the same error when I try to publish my App in the Dev Environment in the maker portal.

Its as if my Application is still looking for these variables even though I have deleted them.  

At the moment I cannot publish the App in Dev or Deploy to upstream environments. :(

Can anyone help or make suggestions on how I can remove this Hidden Dependency??

Many Thanks
Jamie
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,429 Super User 2025 Season 2 on at
     
    Do you go into your App, remove ALL the data source references and then re-add them? If not they won't work since you deleted their required connection references, which is why they are named new_ its stupid but the auto generate connection variables.
     
    So yes, it is still looking for them. Remove All data, turn off the option, then re-add all your data and fix anythign wonky
  • NotOnUrNelly7 Profile Picture
    53 on at
     
    Thank you for your response,  yes I did delete all the connections and then re-add them.  I was unaware of the variables being created.

    I have now switched off the feature in settings.   I will go ahead and delete all my data views and tables again and then switch off the Data Source Environment variables and then re-add them?

    I will let you know how this goes.
     
    Thank you.
    Jamie
  • NotOnUrNelly7 Profile Picture
    53 on at
    @Michael E. Gernaey many thanks for replying this did in fact work.

    Best Regards
    Jamie

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard