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 Automate / Get Current Environment
Power Automate
Unanswered

Get Current Environment

(0) ShareShare
ReportReport
Posted on by 65

Within either a Cloud Flow or a Desktop Flow, is there a way to get the current runtime environment that the flow is being run in? 

 

Use case...I have variables that need to be set based on environment and I would like to not have to alter the flow after deploying to a new environment.

Categories:
I have the same question (0)
  • rsaikrishna Profile Picture
    3,703 on at

    @BI_RPA_Andy 

     

    To get the environment "display name" you should use both workflow() and Get Environment as Admin action.

    Get Environment as Admin required environment ID that you will get from : workflow()['tags']['environmentName']

    Enviroment display name : body('Get_Environment_as_Admin')?['properties']?['displayName']

     

    Please check following reference posts: 

    https://powerusers.microsoft.com/t5/Building-Flows/Get-name-of-environment-that-flow-is-running-in/m-p/725802#M99224 

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-name-of-environment-that-flow-is-running-in/td-p/725828

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

     

  • BI_RPA_Andy Profile Picture
    65 on at

    Your answer seems to assume a level of familiarity with the platform that I do not possess.  I will try to decipher what you mean and work through it.

     

    Additionally, is there a way to obtain this information within Power Automate Desktop apart from an input variable?  I would like to be able to set variables dynamically within a desktop flow independent of a triggering flow.

  • VJR Profile Picture
    7,635 on at

    Hi @BI_RPA_Andy 

     

    In Power Automate Desktop you can make use of the Windows environment variable explained in detail here.

    Using Windows Environment Variables in Power Automate Desktop 

     

  • Ripoll22 Profile Picture
    3 on at

    Although the previous reply works, I would rather go for environment variables, since they provide the exact functionality that you are looking for:

    https://learn.microsoft.com/en-us/power-apps/maker/data-platform/environmentvariables

  • BI_RPA_Andy Profile Picture
    65 on at

    Am I able to access the environment variable from a desktop flow?

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard