Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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

  • Re: How to retrieve "Environment Id"
    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
  • Jcook Profile Picture
    Jcook 7,770 on at
    Re: How to retrieve "Environment Id"
    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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard

Featured topics