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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using Environment Vari...
Power Apps
Answered

Using Environment Variables in Canvas Apps

(0) ShareShare
ReportReport
Posted on by 194
I created an Environment Variable in a solution where I had a canvas app. It has a data type of 'Text' and I would like to use the Env variable in my canvas app.  Is this possible?  If so, how?
 
The purpose of the variable is to change the color of my app if I'm in my Dev environment or Test environment.
  
Thanks for any help or insight.
Categories:
I have the same question (0)
  • Suggested answer
    SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at
     
    Yes, it’s possible to use Environment Variables in a Canvas App.
    To do this, add the Environment Variable Definitions table as a data source in your app. Once connected, you can retrieve and use the variable values just like any other Dataverse record.
     
     
    I hope this helps.
  • Youssef_Arouay Profile Picture
    194 on at
    Hey @SpongYe,
     
     
    Thank you for your response but to add the Environment Variable Definitions table as a data source in my app I should have Dataverse License which not my case : So what are possible solutions without a license !

    I found that I have to make a power automate workflow that return to my app the variable value !
  • Verified answer
    Pstork1 Profile Picture
    69,127 Most Valuable Professional on at
    To use an environment variable value without a premium license you can create a simple Power Automate Flow to retrieve the value(s) and return them to Power Apps. Calling a Flow is  a standard connector and Power Automate surfaces the Environment variables as dynamic content in the flow. Note: The variables won't show until you save the flow the first time.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard