# Custom App deployment

**URL:** <https://community.dynatrace.com/t/custom-app-deployment/55121>\
**Category:** Developer Q&A Forum\
**Created:** [February 26, 2026, 12:22pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121 "2026-02-26T12:22:17Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [February 26, 2026, 12:22pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/1 "2026-02-26T12:22:17Z")

</div>

Hi All,

I was trying to create a Custom App which is having functionality to create Dynatrace workflows based on the data provided in the application. I was able to run the application successfully , but not able to deploy it even in lower tenants.

When trying to deploy it using npm run deploy command, I’m getting the error as below

✔ Creating bundles…  
✔ Built the app  
✔ Validating manifest  
✔ Compressed app artifact  
✖ Failed to deploy the app  
Error: Failed to install the app  
HTTP 400 Bad Request

Manifest of app ‘my.workflow.app’ violates schema

Only apps that are provided by Dynatrace can use the ‘automation:workflows:write’ scope.

I believe that its related to the workflow.write scope been added in the appconfig, but since the functionality involves creation of workflows, I cannot remove this scope as well. Is there any workaround to bypass this issue and deploy the app successfully. Please suggest

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [February 26, 2026, 2:25pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/2 "2026-02-26T14:25:28Z")

</div>

Hi&nbsp;AjithaN,  
This restriction can’t be bypassed, as it’s an important measure to prevent a custom app from doing more than it should.

While your app can’t create the workflow programmatically, you can still let users of your app create workflows by using intents. You can find more about this here:&nbsp;[Use intents for Workflows | Dynatrace Developer](https://developer.dynatrace.com/develop/guides/workflows/use-intents/)

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [February 27, 2026, 12:26pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/3 "2026-02-27T12:26:19Z")

</div>

Thanks for the response. Let me have a look at this&nbsp; and come back

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [April 7, 2026, 6:48am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/4 "2026-04-07T06:48:58Z")

</div>

I was able to fulfill the requirement and create the workflow this way(Just that I made the Deploy functionality of the workflow to be done from Workflows UI itself to bypass the&nbsp;automation:workflows:write scope.

Now I am trying to improve the app by trying to build the capability to create Anomaly Rules based on the input provided in the App. From the developer documentation, I understand that this is possible with Settings API /Dynatrace SDK. I tried some of the below approaches , but didnt get a successful outcome.

1) Create Anomaly Rules Directly from the App using Settings API

The app backend could not communicate securely with the Dynatrace tenant API ---\> invalid peer certificate: UnknownIssuer

2) Create Anomaly Rules from the App backend using Dynatrace SDK --\>no equivalent methods found for creation of Anomaly rules

3)Use Dynatrace Workflows HTTP action to call Settings API --\> NotCapable: Blocked request to ‘els27805’  
(host not in allowlist)

Can you suggest if there is a reliable/feasible approach to fulfill this requirement,or this again has limitations.?

---

<div class="post-metadata">

**Author:** ![Maheedhar\_T](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maheedhar_t/32/155_2.png) [@Maheedhar\_T](https://community.dynatrace.com/u/Maheedhar_T)\
**Post date:** [April 8, 2026, 7:45am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/5 "2026-04-08T07:45:15Z")

</div>

Hi&nbsp;[@AjithaN](https://community.dynatrace.com/user/86234)&nbsp;,  
For host not in allow list, you can go to settings (New) → General → External requests and add patterns like \<tenant-id\>.apps.dynatrace.com and \<tenant-id\>.live.dynatrace.com

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 8, 2026, 12:18pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/6 "2026-04-08T12:18:42Z")

</div>

Thanks for jumping in,&nbsp;[@Maheedhar\_T](https://community.dynatrace.com/user/76275)&nbsp;!

[@AjithaN](https://community.dynatrace.com/user/86234)&nbsp;, here is more info:&nbsp;[Allow external requests | Dynatrace Developer](https://developer.dynatrace.com/develop/guides/app-functions/allow-outbound-connections/)

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [April 10, 2026, 10:13am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/7 "2026-04-10T10:13:27Z")

</div>

Thanks for the response. But May I ask you one thing. How the&nbsp;\<tenant-id\>.apps.dynatrace.com&nbsp; comes as a external request.. Its in this same tenant and link that we are running the workflow or the custom App.

Any hints on the Settings API error if we wanted to have the API call from a custom App

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 10, 2026, 11:44am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/8 "2026-04-10T11:44:21Z")

</div>

**About the external requests:**  
After some testing myself with doing HTTP Requests from a Workflow to your own tenant, I could spot a difference, depending on the API you’re accessing:

- A request to the Hub API, e.g.&nbsp;https://.apps.dynatrace.com/platform/hub/v1/catalog/apps&nbsp;succeeds
- A request to the Environment API v2, e.g.&nbsp;https://\<tenant-id\>.live.dynatrace.com/api/v2/settings/objects&nbsp;fails with the “host not in allowlist” error.

But notice the difference, the domain of the Environment API v2 is different than your normal tenant domain (it’s “.live.” instead of “.apps.”). After adding&nbsp;\<tenant-id\>.live.dynatrace.com&nbsp;to the allow list, the HTTP Request in my workflow succeeded.

**About the Invalid peer certificate: UnknownIssuer error:**  
If you’re not using the Classic Environment V2 SDK yet for your request to the API from your app, I’d recommend giving this a try.

> **[settingsObjectsClient​ - Classic environment v2 | Dynatrace Developer](https://developer.dynatrace.com/develop/sdks/client-classic-environment-v2/#settingsobjectsclient)**
>
> Documentation of the Dynatrace Environment API v2. Resources here generally supersede those in v1. Migration of resources from v1 is in progress. | Client for the Dynatrace Environment API v2

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [April 22, 2026, 12:46pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/9 "2026-04-22T12:46:19Z")

</div>

Hi,

Thanks again for responding. While, I guess I tried this approach as well using DYnatrace SDk.

Basically, I tried 2 approaches now .

1) Settings API (direct API calls )Calling Dynatrace’s Settings API endpoints directlyconst url =&nbsp; &nbsp; &nbsp; “https://{environmentid}.apps.dynatrace.com/api/v2/settings/objects”;&nbsp; &nbsp; const response = await fetch(url, {&nbsp; &nbsp; &nbsp; method: “POST”,&nbsp; &nbsp; &nbsp; headers: {&nbsp; &nbsp; &nbsp; &nbsp; “Content-Type”: “application/json”,&nbsp; &nbsp; &nbsp; &nbsp; “Authorization”: `Bearer ${process.env.DT_API_TOKEN}`&nbsp; &nbsp; &nbsp; },--\>Received invalid peer certificate2) Using Dynatrace SDK (settingsObjectsClient)Here I saw , two types of errors: settingsObjectsClient.postSettingsObjects(…)Method-related errors, e.g.:TypeError: settingsObjectsClient.createSettingsObjects is not a functionAnd later, even with the correct method: settingsObjectsClient.postSettingsObjects(…)&nbsp;invalid peer certificate: UnknownIssuer

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 24, 2026, 11:35am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/10 "2026-04-24T11:35:20Z")

</div>

Using the Dynatrace SDK from within an app function is the correct approach. Are you maybe trying to use it from the UI rather than an app function?

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [April 24, 2026, 2:27pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/11 "2026-04-24T14:27:38Z")

</div>

If using the&nbsp;settingsObjectsClient inside \*.function.ts file is what you refer by app function, then yes I was using it that way only. It looks like the invalid peer certificate error comes at the time of sending request itself before it looks for any authentication/token.So seems to be something at the network layer. Any opinions/suggestions would be of great help.

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 29, 2026, 1:50pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/12 "2026-04-29T13:50:45Z")

</div>

Can you share the code of your app function? (the \*.function.ts) file.  
And have you added “\<tenant-id\>.live.dynatrace.com” to Settings → General → External Requests?

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [April 29, 2026, 6:32pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/13 "2026-04-29T18:32:56Z")

</div>

here is my createRule.function.ts file using settingsObjectClient.&nbsp;\<tenant-id\>.live.dynatrace.com is already there in the external requests host pattern.import {settingsObjectsClient}&nbsp; &nbsp;from “@dynatrace-sdk/client-classic-environment-v2”;&nbsp; &nbsp;export default async function (payload: any) {&nbsp; try {&nbsp; &nbsp; if (!payload) {&nbsp; &nbsp; &nbsp; return {&nbsp; &nbsp; &nbsp; &nbsp; success: false,&nbsp; &nbsp; &nbsp; &nbsp; error: “Payload missing”,&nbsp; &nbsp; &nbsp; };&nbsp; &nbsp; }  
&nbsp; &nbsp; // ✅ IMPORTANT:&nbsp; &nbsp; // postSettingsObjects expects an ARRAY, not { objects: […] }&nbsp; &nbsp; const result = await settingsObjectsClient.postSettingsObjects({&nbsp; &nbsp; &nbsp; body: [&nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; schemaId: “builtin:davis.anomaly-detectors”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scope: “environment”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title: payload.ruleName, &nbsp; &nbsp; // ✅ correct field for your tenant&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabled: true,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cpuUsage: {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabled: true,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; threshold: payload.threshold,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; memoryUsage: {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabled: false,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tagFilters: payload.entityTags,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; ],&nbsp; &nbsp; });  
&nbsp; &nbsp; return {&nbsp; &nbsp; &nbsp; success: true,&nbsp; &nbsp; &nbsp; result,&nbsp; &nbsp; };  
&nbsp; } catch (err: any) {&nbsp; &nbsp; console.error(“ERROR:”, err.message);  
&nbsp; &nbsp; return {&nbsp; &nbsp; &nbsp; success: false,&nbsp; &nbsp; &nbsp; error: err.message,&nbsp; &nbsp; };&nbsp; }}

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 30, 2026, 3:25pm UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/14 "2026-04-30T15:25:40Z")

</div>

Thanks! There’s nothing wrong with that implementation.

Are you hitting the certificate error when running locally (npm run dev) or when the app and it’s app function is deployed to the tenant?

If locally, then maybe something in your corporate network is in the way. In that case, talking to your IT team to obtain the right CA cert and setting it via&nbsp;NODE\_EXTRA\_CA\_CERTS might do the trick.

If deployed, that would mean that something is not right on your tenant - in that case please open a support ticket so they can have a closer look.

I hope this helps to get you closer to the real solution&nbsp;🤞

---

<div class="post-metadata">

**Author:** ![AjithaN](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AjithaN](https://community.dynatrace.com/u/AjithaN)\
**Post date:** [May 4, 2026, 11:50am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/15 "2026-05-04T11:50:15Z")

</div>

[@doesterr](https://community.dynatrace.com/user/89527)&nbsp; NODE\_EXTRA\_CA\_CERTS is already in place in environment variable where the path to certificate.pem file(CA) is already added. I was getting the certificate error at running the application not deployment.. npm run start is the command used.

As I said, I was trying to create an anomaly detection rule using the App and the error comes up after providing the input and while submitting using the below type button..

\<button&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type=“submit”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; style={{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: “12px 0”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: “var(--dt-color-action-primary)”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: “white”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; borderRadius: 8,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: “none”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: “pointer”,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fontSize: 16,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Create Rule (If needed)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</button\>Also, currently, I get this error in the app UI now after I tweaked few things in the code’Rule creation failed: Failed. Schema validation failed.’

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [May 11, 2026, 9:12am UTC](https://community.dynatrace.com/t/custom-app-deployment/55121/16 "2026-05-11T09:12:14Z")

</div>

Please check&nbsp;[Automate alerts with API — Dynatrace Docs](https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection/set-up-anomaly-detectors-via-api)
