# Secure Dynatrace API Token in Exported Azure ARM Templates

**URL:** <https://community.dynatrace.com/t/secure-dynatrace-api-token-in-exported-azure-arm-templates/52756>\
**Category:** Cloud platforms\
**Tags:** azure, data-privacy-and-product-security\
**Created:** [August 1, 2025, 6:04am UTC](https://community.dynatrace.com/t/secure-dynatrace-api-token-in-exported-azure-arm-templates/52756 "2025-08-01T06:04:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jet](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@Jet](https://community.dynatrace.com/u/Jet)\
**Post date:** [August 1, 2025, 6:04am UTC](https://community.dynatrace.com/t/secure-dynatrace-api-token-in-exported-azure-arm-templates/52756/1 "2025-08-01T06:04:33Z")

</div>

We are installing the&nbsp;Dynatrace OneAgent&nbsp;on an&nbsp; **Azure Managed Service Fabric cluster** &nbsp;using an&nbsp;Azure ARM template. The&nbsp; **Dynatrace API token** &nbsp;is passed as a&nbsp;secret value&nbsp;with a reference to an&nbsp;Azure Key Vault secret.

Basically, the&nbsp;**Azure Virtual Machine Scale Set (VMSS) extension**&nbsp;is installed on the&nbsp;Azure Managed Service Fabric cluster node type. We cannot install the extension directly on the VMSS because it will be deleted during the next&nbsp;Azure Managed Service Fabric cluster update. Instead, it must be installed as an extension on the Service Fabric cluster , as documented in&nbsp;Microsoft’s official documentation.

```javascript
{
  "name": "dynatrace",
  "properties": {
    "publisher": "dynatrace.ruxit",
    "type": "<Extension-Type>",
    "typeHandlerVersion": "<Extension-Version>",
    "autoUpgradeMinorVersion": true,
    "settings": {
        "tenantId": "<Environment-ID>",
        "token": "<API-Token>",
        "server": "<Server-Url>",
        "enableLogAnalytics": "yes",
        "hostGroup": "<Host-Group>"
    },
  }
}

```

The issue is that&nbsp;anyone with permissions&nbsp;to export the&nbsp;ARM template&nbsp;of the&nbsp;Azure Managed Service Fabric cluster&nbsp;from the&nbsp;Azure Portal&nbsp;can see the&nbsp;Dynatrace API token&nbsp;in the exported template, which poses a&nbsp; **security risk**.

However, if we install the&nbsp; **OneAgent** &nbsp;using&nbsp; **Azure CLI** &nbsp;directly on the&nbsp; **Azure Virtual Machine** , this issue does not occur. The exported ARM template does not include plain text Dynatrace API token.

Is it possible to mitigate the Dynatrace access token exposure in this case when One agent is installed via ARM template not with az cli or Powershell ?

---

<div class="post-metadata">

**Author:** ![izabelarokita](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/izabelarokita/32/41812_2.png) [@izabelarokita](https://community.dynatrace.com/u/izabelarokita)\
**Post date:** [December 16, 2025, 1:22pm UTC](https://community.dynatrace.com/t/secure-dynatrace-api-token-in-exported-azure-arm-templates/52756/2 "2025-12-16T13:22:16Z")

</div>

Hey&nbsp;[@Jet](https://community.dynatrace.com/user/90573)&nbsp;,  
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&nbsp;:blush:  
Please let me know what works best for you.
