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 / Can we edit an environ...
Power Apps
Unanswered

Can we edit an environment variable inside a managed solution

(0) ShareShare
ReportReport
Posted on by 3,506

We have an environment variable which define the approval email address, now we need to modify this email address inside our Production environment. But the solution is managed, and we are not able to modify this environment variable inside the solution,, any advice?

Categories:
I have the same question (1)
  • SebS Profile Picture
    4,616 Moderator on at

    @johnjohn123 

     

    You will not be able to do so. You need to change it in Your Development Environment and again export it and import it back to production or use Pipeline.

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @johnjohn123 - have you tried updating the environment variable in the Default Solution in your Prod environment?

    Amik_0-1684536062585.png

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution

    If you like my response, please give it a Thumbs Up.

  • SebS Profile Picture
    4,616 Moderator on at

    @Amik 

     

    Good Point I forgot about this one 🙂

  • johnjohn123 Profile Picture
    3,506 on at

    @Amik yes it worked.. but is this a fine/valid appraoch or it is a workaround ?

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    The approach is fine and has been for last 8 months across multiple Solutions which use SharePoint as a db, for apps which use Dataverse as a db I have a different method.

     

    In my opinion this is a workaround because this is not how it is supposed to work. We should avoid adding unmanaged customizations to our Solutions.

    I wrote about this problem here last year: 

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Cannot-update-Environment-variable-on-Import-in-a-Solution/m-p/1817575 

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution

    If you like my response, please give it a Thumbs Up.

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Instead of editing it in either the development environment or the managed solution the recommended method for this is to remove both the default and current value of the variable before exporting the solution. If you do that it will prompt you for new values when you import it into the new environment.  That is the way its designed to work.  Use environment variables in solutions - Power Apps | Microsoft Learn

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    That is the "correct way" @Pstork1 - but as noted in the thread I posted a link to, getting that to work the way it was intended has been very hit and miss

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    As long as I made sure I removed both the default and current values, and I made sure I Published all Customizations before exporting I've never had an issue.  I've seen more issues happen because you can't import new changes with a managed solution if you add an unmanaged layer in the environment.

  • johnjohn123 Profile Picture
    3,506 on at

    @Amik maybe i should not include configuration settings inside my environment variables,, as in my case i am storing the email address for an approvers,, this can be changed if the approver leave the company or change his role..

  • johnjohn123 Profile Picture
    3,506 on at

    @Pstork1 maybe i should not include configuration settings inside my environment variables,, as in my case i am storing the email address for an approvers,, this can be changed if the approver leave the company or change his role..

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