Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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



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.



Super User III
Super User III


Use the expression:

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up

Proud to be a Flownaut!

Check out my blog for Power Automate tips, tricks, and guides

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.


Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (37,888)