# Know the tenant or environment in transforms

**URL:** <https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud, rules\
**Created:** [January 19, 2024, 5:32pm UTC](https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517 "2024-01-19T17:32:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anneragh](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/anneragh/32/8934_2.png) [@anneragh](https://developer.sailpoint.com/discuss/u/anneragh)\
**Post date:** [January 19, 2024, 5:32pm UTC](https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517/1 "2024-01-19T17:32:37Z")

</div>

Is it possible to read tenant information in Transforms without hardcoding?

We have three environments: Development, Staging, and Production. In one of our transformations, we need to determine which environment we’re in without hardcoding the information.

I need to know if we can retrieve URL or tenant details in a rule and use the rule transform to read tenant information. ([Rule | SailPoint Developer Community](https://developer.sailpoint.com/idn/docs/transforms/operations/rule))

Could you suggest any alternative approaches, if there are any?

Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![KevinHarrington](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kevinharrington/32/6776_2.png) [@KevinHarrington](https://developer.sailpoint.com/discuss/u/KevinHarrington)\
**Post date:** [January 19, 2024, 5:41pm UTC](https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517/2 "2024-01-19T17:41:02Z")

</div>

I’ve always just created one hard-coded Static transform that returns the environment, then referenced that using a “reference” transform.

Doesn’t get you 100% of the way there, but if you can get by with this one transform being out of synch, then you don’t need a rule.

---

<div class="post-metadata">

**Author:** ![jsosa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jsosa/32/31578_2.png) [@jsosa](https://developer.sailpoint.com/discuss/u/jsosa)\
**Post date:** [January 19, 2024, 5:55pm UTC](https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517/3 "2024-01-19T17:55:10Z")

</div>

Hi! Besides Kevin recommendation, sometimes I reference environment on source names, for example AD HML, AD PROD… etc. Then I try always to make rules generic. When needed, I can check substring after "AD " (for example for treating some domain), and when something applies to every environment, just ask if the name of the source contains(“AD”).

If you tell more detail about the problem to solve perhaps more ideas can be used.

---

<div class="post-metadata">

**Author:** ![anneragh](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/anneragh/32/8934_2.png) [@anneragh](https://developer.sailpoint.com/discuss/u/anneragh)\
**Post date:** [January 19, 2024, 6:10pm UTC](https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517/4 "2024-01-19T18:10:08Z")

</div>

@KevinHarrington

Thank you for the input! We are also following the same approach of having one centralized transform. We can break our production if we mistakenly synchronize the transform. So, exploring other options on how can we dynamically know which environment we are in without using static transform.

@jsosa Thank you! I will investigate if we have any opportunities to calculate the environment based on source names generically.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [March 19, 2024, 6:10pm UTC](https://developer.sailpoint.com/discuss/t/know-the-tenant-or-environment-in-transforms/24517/5 "2024-03-19T18:10:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
