# WorkFlows get current environment url

**URL:** <https://community.dynatrace.com/t/workflows-get-current-environment-url/40923>\
**Category:** Developer Q&A Forum\
**Tags:** custom-app, coding-assistance, workflows\
**Created:** [July 28, 2023, 3:13pm UTC](https://community.dynatrace.com/t/workflows-get-current-environment-url/40923 "2023-07-28T15:13:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jingyi](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Jingyi](https://community.dynatrace.com/u/Jingyi)\
**Post date:** [July 28, 2023, 3:13pm UTC](https://community.dynatrace.com/t/workflows-get-current-environment-url/40923/1 "2023-07-28T15:13:35Z")

</div>

Hi,

I am currently working on WorkFlows, and try to get current environment URL by&nbsp;getEnvironmentUrl() from ‘@dynatrace-sdk/app-environment’. But when I execute it, it gives me the error shows as the screenshot.

```markup
An error occurred: {"code": 541, "message": "Execution crashed.", "details": {"type": "BAD_REQUEST", "message": "<stripped secret anyhow::Error>"}}

```

Does this mean in WorkFlows it is not allowed use this way to get current environment URL? And is there any other way/function I can use to get the current environment URL?

 ![Jingyi_0-1690556796661.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/8dffdc91a62a72d552e33fee66e88a6f1097f090.png)

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [July 31, 2023, 7:12am UTC](https://community.dynatrace.com/t/workflows-get-current-environment-url/40923/2 "2023-07-31T07:12:52Z")

</div>

Hi&nbsp;[@Jingyi](https://community.dynatrace.com/user/59605),

At the moment, it’s not possible to get environment detail with the `@dynatrace-sdk/app-environment` SDK.&nbsp;However, support for that is planned for later this year.

In the meantime, you can use &nbsp;`globalThis.environmentUrl`&nbsp;to get the current environment URL.

 ![michal_zawislak_0-1690787398561.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/45ce360b3156fc77914fb340f062ff76ed8e6a45.png)
