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 / Not able to Publish Ca...
Power Apps
Answered

Not able to Publish Canvas App with SP lists after deleting the duplicate Environment Variable for the SP Site.

(0) ShareShare
ReportReport
Posted on by 555

I have a Canvas App with multiple Flows in a Solution. Data sources are multiple SharePoint lists.

I exported and imported the App successfully from DEV to UAT and then was working on my App in the DEV Environment and tried changing the Data source to another set of SP lists to test the App's behavior and when I changed back to the original Data sources, I must have forgotten to click to use the existing Environment Variable during the reconnection process and thus system created a second Environment variable for my SP Site. I deleted the recently created Environment Variable thinking it was a redundant one. But system still is connected to the deleted one it seems and now I am unable to publish my App.

Is there a way to fix this mess I just created?

Removing all the data connections and reconnecting to all the lists again with selecting the option to use the existing Environment would fix it? or the duplicate for the SP site would still give an issue?

 

Below is my error Code:

The request failed with error: '{"error":{"code":"0x8004f036","message":"The dependent component EnvironmentVariableDefinition (Id=ggdc_shared_sharepointonline_0a812ac0850642cf985c610a010058f5) does not exist. Failure trying to associate it with CanvasApp (Id=909457bf-6bcb-4e74-a51e-6378f6940b56) as a dependency. Missing dependency lookup type = EntityNameLookup."}}'. The correlation Id is 'b3921834-a088-4c4c-8b97-677337aa3ffd'.

Session ID: bfd46369-af69-4e7f-9113-d1833c97a42e

 

Any help is appreciated.

SueA

Categories:
I have the same question (0)
  • Verified answer
    developerAJ Profile Picture
    4,664 on at

    Removing all the data connections and reconnecting to all the lists again with selecting the option to use the existing Environment would fix it

     

    yes it would fix it.

    i would suggest use the same names for environment variables. if you do that you dont need to do any changes in powerapp.

    if the environment varible name changes than you may need to do changes like wherever ENVLIST1 replace with ENVLIST

    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    It appears that deleting the duplicate environment variable for your SharePoint site has caused issues with publishing your Canvas App. To fix this situation, you can try the following steps:

    1. Remove all data connections: In your Canvas App, remove all the data connections that are associated with the SharePoint lists. This will ensure a clean slate for reconnecting to the correct environment.

    2. Save and close the app: After removing the data connections, save and close the app to ensure that all changes are properly registered.

    3. Reopen the app: Open the app again and add the data connections to the SharePoint lists. During the reconnection process, make sure to select the option to use the existing environment variable that was originally associated with your SharePoint site. This will ensure that the correct environment variable is used.

    4. Verify connections and dependencies: Once you have reconnected to the SharePoint lists, verify that the connections are working correctly. Check if there are any dependency errors or missing components reported.

    5. Test and publish the app: Test your app thoroughly to ensure that the data connections are functioning as expected. If everything is working correctly, attempt to publish the app to see if the issue is resolved.

    If following these steps doesn't resolve the problem, you may need to seek further assistance from Microsoft support. They can provide more specific guidance based on the details of your environment and the error message you received.

  • SueA Profile Picture
    555 on at

    Hi @developerAJ  and @ShaheerAhmad:

    Yes, you both are correct! I needed to remove, save and restart, reconnect, recreate and reassign in order to move further.

    For future reference, I wanted to point out that with creating new Environment Variables by removing the data source and reconnecting to the Power App again (with the option in the Setting to create Environment variable during data connection option turned on) makes all of them (Both the Deleted and New ones) show in the dropdown of the custom selection of Site and List URLs for the flows' triggers and actions regardless of if the environment variables were deleted from the environment or not! This makes it really hard to select the correct one for the Flows.

    The workaround I found that on left hand side menu select Environment Variables tab then print the list of all the variables for your project that are current and when assigning to the Flow make sure to select the correct/current  ones for each site and each list to keep things in order.

    Thanks again.

    Regards,

    SueA

    Thanks again! I am now able to publish my Canvas App and export to UAT successfully. Appreciate @ShaheerAhmad  for your step by step process and pointer to do a test prior to export!

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