# Zscaler to Dynatrace Integration

**URL:** <https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819>\
**Category:** Automations\
**Tags:** integrations, technologies\
**Created:** [May 26, 2025, 9:16am UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819 "2025-05-26T09:16:02Z")\
**Posts on this page:** 9\
**Page:** 3

<div class="post-metadata">

**Author:** ![salvarezq](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@salvarezq](https://community.dynatrace.com/u/salvarezq)\
**Post date:** [June 23, 2025, 11:26pm UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/41 "2025-06-23T23:26:54Z")

</div>

Hello, I would like a simple solution for these types of integrations that only support OAuth or mainly Token - Bearer. I have the same problem as MarwanC; we have a large population in Zscaler and we cannot send those events. The same happens to me with other platforms that do not allow sending authentication by adding content to the headers.

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [June 29, 2025, 3:35pm UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/42 "2025-06-29T15:35:34Z")

</div>

After many weeks of investigations and code trial, I managed to develop a solution to encapsulate OAuth2 with the Api-Token /v2/logs/ingest which works like a breath in App Function. If anybody is interested in this solution drop me a line for the source code. So Dynatrace does not need to bother developing this interface anymore and they can focus on other important and vital integration.

---

<div class="post-metadata">

**Author:** ![salvarezq](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@salvarezq](https://community.dynatrace.com/u/salvarezq)\
**Post date:** [June 29, 2025, 5:43pm UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/43 "2025-06-29T17:43:32Z")

</div>

Thank you for your contribution. How could you share it to validate if it is possible to use it in our environment?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 29, 2025, 9:11pm UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/44 "2025-06-29T21:11:23Z")

</div>

[@MarwanC](https://community.dynatrace.com/user/64346)&nbsp;happy to hear that. Can you share that on github and post the link to the repository or attach a source code here for others?

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [June 30, 2025, 7:30am UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/45 "2025-06-30T07:30:29Z")

</div>

Will share on a github!

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [June 30, 2025, 1:17pm UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/46 "2025-06-30T13:17:45Z")

</div>

Before publishing the code, I identified a critical concern regarding securing token handling. Currently, the AppFunction URL accepts the api-token=dt… query parameter directly, which — while functionally effective — introduces a serious exposure vector. Any system capable of invoking this URL could potentially manipulate or access other AppFunctions, which undermines the principle of least privilege.

My primary dilemma lies in how to decouple the token from the source code without introducing secondary vulnerabilities. One avenue I considered is decrypting the token at runtime using a stored encrypted version, but that naturally leads to the question of securely managing the decryption key. Alternatively, retrieving the token from the Dynatrace Vault appears promising — however, this also presumes I possess a bootstrap token to access the Vault, reintroducing the trust chain problem from a different angle.

Unfortunately, in this deployment context, I do not have a reliable mechanism to inject environment variables at the OS level, which rules out the typical process.env-based secret injection.

Therefore, I would welcome any recommendations on enforcing secure token access while avoiding token sprawl or exposing secrets either statically in code or dynamically via unprotected endpoints. If there is a proven pattern for secret chaining, token delegation, or ephemeral token injection compatible with Dynatrace AppFunctions, I would be keen to explore it.

Last way is to do this via passing the header and use part of the incoming fixed platform Bearer token as a secret, but again I can not find a way to read headers in AppFunctions I can only read payload.

Thank you for your support or any feedback in fine-tuning this implementation for both security posture and operational reliability.

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [July 17, 2025, 9:34am UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/47 "2025-07-17T09:34:20Z")

</div>

here I share the function and I adopted the option to use an encrypted Api-Token in the code and working on fetching this from the vault next. I contribute this code to the code to the community, There is a possibility that Dynatrace will make the log ingest API available via OAuth2, until then I have the solution in the bag.

Here is the function, Enjoy!

import { isValidJson, getEndPoint } from ‘../functions’;  
interface IngestResponse {&nbsp; status: number;&nbsp; code?: number;&nbsp; message: string;&nbsp; body?: string;&nbsp; error?: any;}  
export default async function (payload: string): Promise\<IngestResponse\> {&nbsp; let input: string;  
&nbsp; try {&nbsp; &nbsp; input = JSON.stringify(payload);  
&nbsp; &nbsp; const response = await fetch(getEndPoint(), {&nbsp; &nbsp; &nbsp; method: ‘POST’,&nbsp; &nbsp; &nbsp; headers: {&nbsp; &nbsp; &nbsp; &nbsp; ‘Content-Type’: ‘application/json’&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; body: input&nbsp; &nbsp; });  
&nbsp; &nbsp; const text = await response.text();  
&nbsp; &nbsp; // Try to parse structured error/response body if present&nbsp; &nbsp; const parsed = (() =\> {&nbsp; &nbsp; &nbsp; try {&nbsp; &nbsp; &nbsp; &nbsp; return JSON.parse(text);&nbsp; &nbsp; &nbsp; } catch {&nbsp; &nbsp; &nbsp; &nbsp; return null;&nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; })();  
&nbsp; &nbsp; if (response.ok) {&nbsp; &nbsp; &nbsp; return {&nbsp; &nbsp; &nbsp; &nbsp; status: response.status,&nbsp; &nbsp; &nbsp; &nbsp; message: response.status === 204 ? ‘Success. No content returned.’ : ‘Log(s) ingested.’,&nbsp; &nbsp; &nbsp; &nbsp; body: text&nbsp; &nbsp; &nbsp; };&nbsp; &nbsp; } else {&nbsp; &nbsp; &nbsp; return {&nbsp; &nbsp; &nbsp; &nbsp; status: response.status,&nbsp; &nbsp; &nbsp; &nbsp; code: parsed?.error?.code ?? response.status,&nbsp; &nbsp; &nbsp; &nbsp; message: parsed?.error?.message ?? ‘Ingest failed’,&nbsp; &nbsp; &nbsp; &nbsp; body: text,&nbsp; &nbsp; &nbsp; &nbsp; error: parsed?.error&nbsp; &nbsp; &nbsp; };&nbsp; &nbsp; }&nbsp; } catch (err: any) {&nbsp; &nbsp; return {&nbsp; &nbsp; &nbsp; status: 0,&nbsp; &nbsp; &nbsp; code: -1,&nbsp; &nbsp; &nbsp; message: err.message ?? ‘Unexpected error’,&nbsp; &nbsp; &nbsp; error: err&nbsp; &nbsp; };&nbsp; }}

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [August 1, 2025, 9:47am UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/48 "2025-08-01T09:47:06Z")

</div>

Just for people to go to the right solution section on this topic, the solution I provided is to use an AppFunction that can do the Ingest from Zscaler, this solution is provided to you free using the above AppFunction code. Enjoy!

---

<div class="post-metadata">

**Author:** ![meetghodasara](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@meetghodasara](https://community.dynatrace.com/u/meetghodasara)\
**Post date:** [October 21, 2026, 8:51am UTC](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819/49 "2026-10-21T08:51:14Z")

</div>

Hello everyone,

Sharing an update for everyone following this thread: the **Zscaler Internet Access (ZIA)** and **Zscaler Private Access (ZPA)** extensions are now available on Dynatrace Hub, and I’m part of the team developing them.

Thank you to everyone who contributed to this discussion, and a special thanks to [@MarwanC](https://community.dynatrace.com/user/64346)&nbsp;for sharing the AppFunction approach with the community!

If you’re looking to bring ZIA or ZPA data into Dynatrace, these extensions are now available to help you get started.

**Zscaler Internet Access (ZIA)**

- Supports ZIA Cloud NSS feeds for Web, Firewall, DNS, Tunnel, and Admin Audit logs.
- Provides metrics, Smartscape topology (Locations, Users, and Tunnels), dashboards, and alert templates.

**Zscaler Private Access (ZPA)**

- Supports ZPA Log Streaming Service (LSS) logs forwarded through a log shipper such as Fluent Bit or BindPlane.
- Provides metrics, Smartscape topology (Users, Applications, App Connectors, and their groups), dashboards, and alert templates.

**Useful links**

- [Dynatrace Hub – Zscaler Internet Access (ZIA) extension](https://www.dynatrace.com/hub/detail/zscaler-internet-access-zia/)
- [ZIA setup guide and documentation](https://docs.dynatrace.com/docs/shortlink/zscaler-zia-extension)
- [Dynatrace Hub – Zscaler Private Access (ZPA) extension](https://www.dynatrace.com/hub/detail/zscaler-private-access-zpa/)
- [ZPA setup guide and documentation](https://docs.dynatrace.com/docs/shortlink/zscaler-zpa-extension)

If you have any questions, feedback, or need assistance with the setup, please feel free to reach out. I’d be happy to help!

[Previous page](https://community.dynatrace.com/t/zscaler-to-dynatrace-integration/51819.md?page=2)
