Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Adding environment variable to canvas app

(1) ShareShare
ReportReport
Posted on by 19

I've created environment variables pointing to a SP site and SP list within that site, when I open a canvas app it's not pulling through the environment variables as an option in the advanced tab of the Sharepoint connector. I've made sure I'm using the same connection. The variables appear fine in a cloud flow created in the same solution. What else could be stopping an env var created in a solution package from appearing in an app in that same solution?

dds_1-1642081225513.png

 

dds_0-1642081204505.png

dds_2-1642081276188.png

 

 

  • dds Profile Picture
    19 on at
    Re: Adding environment variable to canvas app

    It does appear that the only way I can utilise env variables in a canvas app is by using the 'Automatically create environment variables when adding data sources' option within the app.

    I've tried with creating a new app both before and after independently creating the env var's in the same solution package and they still don't appear as options in the data source setup pane, unless the App has created them automatically as above.

     

    Thanks!

  • Verified answer
    meelamri Profile Picture
    468 on at
    Re: Adding environment variable to canvas app

    Hi, 

     

    There is a note on the documentation which states that existing canvas app cannot use environment variables for data sources. It is recommended to delete the data source and recreate it in order to use environment variables.

    I'm not sure if this is for your case. Anyway, don't hesitate to have a look, it could help;

     

    melamri_0-1642165190537.png

    https://docs.microsoft.com/en-us/powerapps/maker/data-platform/EnvironmentVariables#use-data-source-environment-variables-in-canvas-apps

     

    Hope it helps ..

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 72 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard