Home > Canvas Apps > Canvas App | Get Environment ID without the need of cloud flow

Canvas App | Get Environment ID without the need of cloud flow

In one of my previous articles I explained the steps to fetch the Environment ID in Power Automate flows.

In this article, lets see how to leverage Canvas Apps table data source, to fetch the Environment ID in Canvas App.

What is Environment Id

  • In Power Platform, Environment is a space to store, manage, and share your organization’s business data, apps, chatbots, and flows.
  • Every Environment will be associated with an unique identifier.

Steps to fetch the Environment ID in Canvas App:

  • Add the Canvas Apps table data source to your Canvas App.
  • Add a Button and on onselect paste the following formula
Set(CurrentAppUri, First('Canvas Apps').AppOpenUri);
Set(CurrentEnvironmentID, Right(Match(CurrentAppUri,"/e/.*(?=/a)").FullMatch,36));
  • If you notice the formula, Environment ID has been captured and got set in to ‘CurrentEnvironmentID’ variable.
  • Add a label to display the Environment ID.

🙂

  1. Kurt Reynolds
    December 19, 2023 at 1:03 AM

    Great Article Rajeev, just found this and it saved me quite a bit of time, I was using Power Automate before.

  1. July 12, 2023 at 8:12 PM

Leave a comment