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 / How to retrieve "Envir...
Power Automate
Unanswered

How to retrieve "Environment Id" via Dynamics 365 using JS?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm working on a piece of functionality on an internal dynamics 365 admin tool. Currently I'm in the process of adding a "Edit Form" function to this. The function allows users to select their solution and then open a new window to edit the form in the new power platform form editor.

 

The URL that needs to be constructed for this requires the CDS/Power Platform "environment id". So my question is, how do I go about retrieving the environment id that relates to my current dynamics 365 instance? Or alternatively, how can I retrieve all environment id's (and their names) within the tenancy?

 

Is there some kind of API I can hit?

 

PS, I cannot make use of power automate (flow) as I need to be able to use this tool across multiple tenancies.

 

Thanks

Categories:
I have the same question (0)
  • Jcook Profile Picture
    7,781 Most Valuable Professional on at
    Hello,

    Use the expression:
    workflow()?['tags']['environmentName']

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Thanks for replying but I'm not looking to do this via Flow. I am trying to retrieve this info via Dynamics 365 using JavaScript.

    Thanks

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 60 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 54

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard