Detect environment type in BeforeProvisioning or any Rule

In IdentityNow, is there a way to determine which environment the code is executing in? E.g.:

if(environment.equals(“myenv-sb”)) appName = “AD - Sandbox”;

if(environment.equals(“myenv”)) appName = “AD - Production”;

Thanks.

You could use IDN /org-config API to get that information and then use it in the before provisioning rule.