Showing results for 
Search instead for 
Did you mean: 

How to get flow environment id from dynamics crm?

Use case : Open flow URL from dynamics crm 365 context.


Issue: How to get environment id of the flow url (Eg. from dynamics 365.


Thank You


Community Support
Community Support

Hi @sandeepnmenon,


You could use WDL function to get the environment id contained in flow url.






Best Regards,


Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft


I need the environment Id programmatically in dynamics crm (Eg. solutiuon, custom control, plugin etc.), not in the flow edit experience. 




Did you find out how to do this by any chance?

Hello @huseyinazizcan ,

I found a solution to this but I don't think it is supported.

You can get the Environment Id in Microsoft Dynamics using the following code


Best regards,

Betim Beja. 



This returns a null value for me. In which context do you execute this function?


I tried to simply run it from the console by the way.


after some more digging, I figured out that this value gets written to the local storage after you click the flow button in the ribbon 

Flow Ribbon.png

yes, the fastest way to test this is to execute the script in the console. You could peek the local storage using the Application tab in the DevTools too.


Best regards,

Betim Beja.

Thanks for the help anyway. Back to the drawing board I guess.


I really appreciate your help anyway.

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (4,411)