<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article How to Investigate an Exposed Dynatrace API Token in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-Investigate-an-Exposed-Dynatrace-API-Token/ta-p/295528</link>
    <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="5"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H2&gt;Summary&lt;/H2&gt;
&lt;P&gt;The purpose of this community post is to provide guidance for investigating an exposed Dynatrace API token via a public Git repository.&lt;/P&gt;
&lt;P&gt;Accidental exposure of secrets in Git repositories is more common than many teams may expect. A configuration file may be committed without noticing an embedded API token, or credentials may be pushed alongside a rapid code change. An internal repository can also become publicly accessible due to migration, misconfiguration, or administrative error. Even if secrets are later removed, they may still remain in the repository's commit history.&lt;/P&gt;
&lt;P&gt;Whether you are contacted by Dynatrace Security, or discover credential exposure independently, it is important to understand that exposure does not automatically mean compromise. The steps provided in this article are designed to help you validate whether the token(s) was misused before it was rotated or invalidated.&lt;/P&gt;
&lt;H2&gt;Problem&lt;/H2&gt;
&lt;P&gt;Dynatrace may notify you when GitHub Secret Scanning detects a public Dynatrace token exposure. This guide shows how to Validate the exposure, review audit logs for potential misuse, and remediate.&lt;/P&gt;
&lt;H2 id="Prerequisites" data-local-id="18cf060cea71" data-renderer-start-pos="1003"&gt;&lt;STRONG data-renderer-mark="true"&gt;Prerequisite&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P data-local-id="e9b6e171fc01" data-renderer-start-pos="1018"&gt;&lt;EM data-renderer-mark="true"&gt;These steps assume audit logging was enabled prior to the exposure event; if it was not enabled, historical audit visibility may be limited.&lt;/EM&gt;&lt;/P&gt;
&lt;P data-local-id="40e66f086d7f" data-renderer-start-pos="1160"&gt;Before beginning your investigation:&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="1" data-local-id="c98d0afbc591"&gt;
&lt;LI&gt;
&lt;P data-local-id="b3e7b46c1315" data-renderer-start-pos="1200"&gt;Upload our prebuilt Dynatrace notebook that contains ready-to-go queries to your environment&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="14e506d24965" data-renderer-start-pos="12074"&gt;Ensure that &lt;A title="https://docs.dynatrace.com/docs/manage/data-privacy-and-security/configuration/audit-logs-api" href="https://docs.dynatrace.com/docs/manage/data-privacy-and-security/configuration/audit-logs-api" target="_blank" rel="noopener" data-renderer-mark="true"&gt;audit logging&lt;/A&gt; is enabled in the affected environment&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2" data-local-id="c7245bf64961"&gt;
&lt;LI&gt;
&lt;P data-local-id="9c8f8b9f96bd" data-renderer-start-pos="12142"&gt;To enable audit logging&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="3" data-local-id="6f279e070752"&gt;
&lt;LI&gt;
&lt;P data-local-id="01919f6ec34c" data-renderer-start-pos="12169"&gt;Go to Settings -&amp;gt; Preferences -&amp;gt; Log audit events.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="4942c5cefe89" data-renderer-start-pos="12223"&gt;Turn on Log all audit-related system events.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="399e4184d746" data-renderer-start-pos="12271"&gt;You can also enable audit logs via &lt;A class="_ymio1r31 _ypr0glyw _zcxs1o36 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _4bfu1r31 _1hms8stv _ajmmnqa1 _vchhusvi _kqswh2mm _ect4ttxp _syaz13af _1a3b1r31 _4fpr8stv _5goinqa1 _f8pj13af _9oik1r31 _1bnxglyw _jf4cnqa1 _30l313af _1nrm1r31 _c2waglyw _1iohnqa1 _9h8h12zz _10531ra0 _1ien1ra0 _n0fx1ra0 _1vhv17z1" title="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/data-privacy-api/put-configuration" href="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/data-privacy-api/put-configuration" target="_blank" rel="noopener" data-renderer-mark="true"&gt;Data privacy API&lt;/A&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-local-id="2e5f22823258" data-renderer-start-pos="12331"&gt;&lt;STRONG data-renderer-mark="true"&gt;Retention Note:&lt;/STRONG&gt; Dynatrace retains audit logs for 30 days and automatically deletes them afterwards. However, Grail audit events are stored for 1 year.&lt;/P&gt;
&lt;P data-local-id="2e5f22823258" data-renderer-start-pos="12331"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="Required-Permissions" data-renderer-start-pos="12483" data-local-id="42ef68f8952e"&gt;&lt;STRONG data-renderer-mark="true"&gt;Required Permissions&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P data-local-id="058068238b4c" data-renderer-start-pos="12505"&gt;You will need:&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="1" data-local-id="685136037d0f"&gt;
&lt;LI&gt;
&lt;P data-local-id="e541a776d952" data-renderer-start-pos="12523"&gt;auditLogs.read permission (for the Audit Logs API)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="6be0626cfa09" data-renderer-start-pos="12577"&gt;logs.read permission (for Dynatrace DQL log searches)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="e0a97ecb0883" data-renderer-start-pos="12634"&gt;Access to the environment where the token was issued&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="c18cbcc7a53d" data-renderer-start-pos="12690"&gt;For IAM Policy related permissions please review &lt;A class="_ymio1r31 _ypr0glyw _zcxs1o36 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _4bfu1r31 _1hms8stv _ajmmnqa1 _vchhusvi _kqswh2mm _ect4ttxp _syaz13af _1a3b1r31 _4fpr8stv _5goinqa1 _f8pj13af _9oik1r31 _1bnxglyw _jf4cnqa1 _30l313af _1nrm1r31 _c2waglyw _1iohnqa1 _9h8h12zz _10531ra0 _1ien1ra0 _n0fx1ra0 _1vhv17z1" title="https://docs.dynatrace.com/docs/shortlink/audit-logs-grail#permissions" href="https://docs.dynatrace.com/docs/shortlink/audit-logs-grail#permissions" target="_blank" rel="noopener" data-renderer-mark="true"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2" data-local-id="d1af416eff9c"&gt;
&lt;LI&gt;
&lt;P data-local-id="e1f9e8da3e7d" data-renderer-start-pos="12747"&gt;storage:buckets:read&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="835f8aa18cef" data-renderer-start-pos="12771"&gt;storage:logs:read&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-local-id="d0380e324b39" data-renderer-start-pos="12794"&gt;You can verify permissions under:&lt;/P&gt;
&lt;P data-local-id="fb7254c0df6b" data-renderer-start-pos="12829"&gt;Account Management → User Management → Permissions&lt;/P&gt;
&lt;H2 data-local-id="fb7254c0df6b" data-renderer-start-pos="12829"&gt;Troubleshooting Steps&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="Step-1---Reviewing-the-Token-in-the-UI" data-renderer-start-pos="12881" data-local-id="c326398a4a33"&gt;&lt;STRONG data-renderer-mark="true"&gt;Step 1: Reviewing the Token in the UI&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P data-local-id="cbf2435b512c" data-renderer-start-pos="12921"&gt;Navigate to the Access Tokens application in your tenant UI and identify the token that has been exposed. An example for Personal Access Tokens is also provided.&lt;/P&gt;
&lt;P data-local-id="c6d020ec6098" data-renderer-start-pos="13084"&gt;&lt;STRONG&gt;New Dynatrace UI: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-local-id="c6d020ec6098" data-renderer-start-pos="13084"&gt;https://{your-environment-id}.live.dynatrace.com/ui/apps/dynatrace.classic.tokens/ui/access-tokens&lt;/P&gt;
&lt;P data-local-id="a3bc80bf5ceb" data-renderer-start-pos="13202"&gt;https://{your-environment-id}.live.dynatrace.com/ui/apps/dynatrace.classic.personal.access.tokens/ui/personal-access-tokens&lt;/P&gt;
&lt;P data-local-id="84bac836bb9e" data-renderer-start-pos="13327"&gt;&lt;STRONG&gt;Dynatrace Classic UI: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-local-id="84bac836bb9e" data-renderer-start-pos="13327"&gt;https://{your-environment-id}.live.dynatrace.com/ui/access-tokens&lt;/P&gt;
&lt;P data-local-id="23b1cf25f405" data-renderer-start-pos="13416"&gt;https://{your-environment-id}.live.dynatrace.com/ui/personal-access-tokens&lt;/P&gt;
&lt;P data-local-id="75c9e2b11b17" data-renderer-start-pos="13492"&gt;Here you can check:&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="1" data-local-id="c3c4e7fbe00e"&gt;
&lt;LI&gt;
&lt;P data-local-id="892a7b5681b5" data-renderer-start-pos="13515"&gt;Creation date&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="5c217c0fa259" data-renderer-start-pos="13532"&gt;Last used timestamp&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="404f85150310" data-renderer-start-pos="13555"&gt;Last used IP address&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="8e398dc13cbd" data-renderer-start-pos="13579"&gt;Assigned scopes&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2" data-local-id="a035e2f0d531"&gt;
&lt;LI&gt;
&lt;P data-local-id="0094159f0ecc" data-renderer-start-pos="13598"&gt;Token scopes can help estimate the impact of the event at a glance, for example the scope to ingest logs could impact integrity but not confidentiality, because a potential attacker would not have been able to extract data.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="e75fd75a4cff" data-renderer-start-pos="13827"&gt;Token status (enabled/disabled)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-local-id="c2d126657893" data-renderer-start-pos="13862"&gt;If the token was publicly exposed, it is best to assume it may have been accessible to third parties.&lt;/P&gt;
&lt;P data-local-id="2ba5a4335e46" data-renderer-start-pos="13965"&gt;Our recommendation:&lt;BR /&gt;Immediately disable or delete the token and verify whether the “Last used” timestamp aligns with expected activity.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bez nazwy.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32180i6C71DAA60E31631A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bez nazwy.png" alt="Bez nazwy.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3 id="Step-2---Reviewing-Audit-Logs-via-API" data-renderer-start-pos="14105" data-local-id="afc8c02a9801"&gt;&lt;STRONG data-renderer-mark="true"&gt;Step 2: Reviewing Audit Logs via API&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P data-local-id="715c57410c14" data-renderer-start-pos="14144"&gt;&lt;A class="_ymio1r31 _ypr0glyw _zcxs1o36 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _4bfu1r31 _1hms8stv _ajmmnqa1 _vchhusvi _kqswh2mm _ect4ttxp _syaz13af _1a3b1r31 _4fpr8stv _5goinqa1 _f8pj13af _9oik1r31 _1bnxglyw _jf4cnqa1 _30l313af _1nrm1r31 _c2waglyw _1iohnqa1 _9h8h12zz _10531ra0 _1ien1ra0 _n0fx1ra0 _1vhv17z1" title="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/audit-logs/get-log" href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/audit-logs/get-log" target="_blank" rel="noopener" data-renderer-mark="true"&gt;Audit Logs API Documentation&lt;/A&gt;&lt;/P&gt;
&lt;P data-local-id="b24b9d62aac7" data-renderer-start-pos="14174"&gt;You can retrieve audit events related to token lifecycle activity using the audit logs.&lt;/P&gt;
&lt;P data-local-id="ecd7f7530a1f" data-renderer-start-pos="14264"&gt;Example API Call:&lt;/P&gt;
&lt;DIV class="code-block css-y5zsxb" data-local-id="770762d8e879"&gt;&lt;SPAN class="prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf" aria-label="Scrollable content" data-testid="renderer-code-block" data-ds--code--code-block="" data-code-lang=""&gt;&lt;CODE class="language-" style="white-space: pre;"&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-1"&gt;curl -X 'GET' \
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-2"&gt;"https://{your-environment-id}.live.dynatrace.com/api/v2/auditlogs?filter=category(\"TOKEN\"),entityId(\"{token-id}\")&amp;amp;sort=-timestamp" \
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-3"&gt;-H "accept: application/json; charset=utf-8" \
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-4"&gt;-H "Authorization: Api-Token {your-investigation-token}"
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Important:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use a separate investigation token, not the exposed one
&lt;UL&gt;
&lt;LI&gt;Permissions/scope for the token would be:
&lt;UL&gt;
&lt;LI&gt;auditLogs.read&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Replace {token-id} with the token identifier, not the token secret itself
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;In a Dynatrace token dt0c01.TEST12345678901234567890.TEST123456789012345678901234567890123456789012345678901234567890 the identifier, or public part, in this case would be dt0c01.TEST12345678901234567890&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;This example filters for:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Object category = TOKEN&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Specific token entityId&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Most recent events first&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;If the response includes a nextPageKey, request the next page by using only nextPageKey (do not include filter/sort/pageSize on the next request).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example with Pagination:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;curl -X 'GET' \&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;"https://{your-environment-id}.live.dynatrace.com/api/v2/auditlogs?nextPageKey={PASTE_VALUE_FROM_RESPONSE}" \&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-H 'accept: application/json; charset=utf-8' \&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-H 'Authorization: Api-Token {your-investigation-token}"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other events to review:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Token Creation&lt;/LI&gt;
&lt;LI&gt;Token Updates&lt;/LI&gt;
&lt;LI&gt;Token Deletion&lt;/LI&gt;
&lt;LI&gt;Config changes that occurred post exposure&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Look for:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Unusual timestamps&lt;/LI&gt;
&lt;LI&gt;Unknown IP addresses
&lt;UL&gt;
&lt;LI&gt;If you observe unfamiliar IPs, compare them against your organization's known IP ranges and consider using your preferred threat intelligence source for further evaluation of suspicious IPs (for example AbuseIPDB or VirusTotal)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;New token creations&lt;/LI&gt;
&lt;LI&gt;Scope modifications&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 3: Investigate with DQL&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Audit Logs&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;If the exposed token was used for ingesting logs, you can search for ingestion activity using:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf" data-testid="renderer-code-block" data-ds--code--code-block="" data-code-lang=""&gt;&lt;CODE class="language-" style="white-space: pre;"&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-1"&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-2"&gt;// Filter for a specific token
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-3"&gt;| filter dt.auth.origin == "&amp;lt;public part of your token&amp;gt;"
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-4"&gt;// Fields to be displayed
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-5"&gt;| fields timestamp,
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-6"&gt;         dt.auth.origin,
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-7"&gt;         content
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-8"&gt;// Sort by timestamp
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-9"&gt;| sort timestamp desc&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;dt.auth.origin is populated for ingestion-related tokens and identifies the token origin used to ingest the log record.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; dt.auth.origin only appears for ingestion related tokens&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Audit Events&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;You can also search audit events stored in Grail:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf" data-testid="renderer-code-block" data-ds--code--code-block="" data-code-lang=""&gt;&lt;CODE class="language-" style="white-space: pre;"&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-1"&gt;fetch dt.system.events
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-2"&gt;// Narrow scope to audit events only
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-3"&gt;| filter event.kind == "AUDIT_EVENT"
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-4"&gt;// Filter down to view only the desired token
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-5"&gt;| filter authentication.token == "&amp;lt;public part of your token&amp;gt;"
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-6"&gt;// Sort by timestamp
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-7"&gt;| sort timestamp desc&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;From these results, you may be able to identify:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;When a token was last used&lt;/LI&gt;
&lt;LI&gt;The IP address associated with authentication&lt;/LI&gt;
&lt;LI&gt;Failed authentication attempts&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Resolution&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;The same steps are recommended for all public token exposures. Perform containment before investigation to ensure that, even if no breach has occurred yet, the exposed token cannot be abused going forward:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Always revoke all exposed tokens as soon as possible
&lt;UL&gt;
&lt;LI&gt;As long as an exposed token is valid, it can be abused&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Rotate credentials as necessary
&lt;UL&gt;
&lt;LI&gt;Create replacement tokens with least privilege, update integrations, and validate everything still works&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Delete the token from code/config and re-write commit history if it was committed. Consider making the repository private if appropriate, and ensure forks/branches do not still contain the secret&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If no suspicious activity is found, revoking the exposed token(s), rotating replacements, and removing the secret from the repo/history is typically sufficient for resolution.&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If suspicious activity is detected, follow your organization's incident response process. The troubleshooting steps in this guide can help identify actions performed using the token.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If the exposed token had permission to create/modify tokens, or to change permissions, revoke any newly created tokens and remove any unauthorized access&lt;/LI&gt;
&lt;LI&gt;In call cases, revoking the exposed token(s) stops further use of those credentials&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;What's next&lt;/H2&gt;
&lt;P&gt;If this article did not help, please open a support ticket, mention that this article was used and provide the following in the ticket:&lt;/P&gt;
&lt;DIV class="p-client_container"&gt;
&lt;DIV class="p-ia4_client_container"&gt;
&lt;DIV class="p-ia4_client p-ia4_client--with-search-in-top-nav p-ia4_client--workspace-switcher-rail-visibletest p-ia4_client--sidebar-wide p-ia4_client--narrow-feature-on"&gt;
&lt;DIV class="p-client_workspace_wrapper" role="tabpanel" aria-label="Dynatrace"&gt;
&lt;DIV class="p-client_workspace" role="tabpanel" aria-label="DMs"&gt;
&lt;DIV class="p-client_workspace__layout"&gt;
&lt;DIV class="active-managed-focus-container" role="none"&gt;
&lt;DIV class="p-view_contents p-view_contents--primary" tabindex="-1" role="dialog" aria-label="Conversation with Anton Konikov"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="channel_tab_panel__zJ5Bt c-tabs__tab_panel c-tabs__tab_panel--active c-tabs__tab_panel--full_height" role="none" data-qa="tabs_content_container"&gt;
&lt;DIV class="p-file_drag_drop__container"&gt;
&lt;DIV class="p-workspace__primary_view_body"&gt;
&lt;DIV class="p-message_pane p-message_pane--classic-nav p-message_pane--scrollbar-float-adjustment p-message_pane--with-bookmarks-bar" data-qa="message_pane"&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV class="c-virtual_list c-virtual_list--scrollbar c-message_list c-message_list--floating c-message_list--dark c-scrollbar c-scrollbar--fade" role="presentation"&gt;
&lt;DIV class="c-scrollbar__hider" role="presentation" data-qa="slack_kit_scrollbar"&gt;
&lt;DIV class="c-scrollbar__child" role="presentation"&gt;
&lt;DIV class="c-virtual_list__scroll_container" tabindex="-1" role="list" data-qa="slack_kit_list" aria-label="Anton Konikov (direct message, active)"&gt;
&lt;DIV id="1734101723.604509" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1734101723.604509"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;UL class="p-rich_text_list p-rich_text_list__bullet p-rich_text_list--nested" data-stringify-type="unordered-list" data-list-tree="true" data-indent="0" data-border="1" data-border-radius-top-cap="0"&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;An authorized contact on the ticket: Add a user who can view audit logs and any required sensitive/security data in the tenant&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Link to the affected tenant&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Approximate date/time the secret may have been exposed and the timeframe you reviewed in the audit logs&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;What you have already done, whether the token was revoked, replacements created/updated, and whether the commit history was rewritten/purged&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Where you are blocked, the specific step/section of this article.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Security note:&amp;nbsp;&lt;/STRONG&gt;Do not paste tokens into the ticket or support chat. Please obfuscate or omit any secrets from screenshots/logs.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Mar 2026 11:58:47 GMT</pubDate>
    <dc:creator>ZackCompora</dc:creator>
    <dc:date>2026-03-05T11:58:47Z</dc:date>
    <item>
      <title>How to Investigate an Exposed Dynatrace API Token</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-Investigate-an-Exposed-Dynatrace-API-Token/ta-p/295528</link>
      <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="5"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H2&gt;Summary&lt;/H2&gt;
&lt;P&gt;The purpose of this community post is to provide guidance for investigating an exposed Dynatrace API token via a public Git repository.&lt;/P&gt;
&lt;P&gt;Accidental exposure of secrets in Git repositories is more common than many teams may expect. A configuration file may be committed without noticing an embedded API token, or credentials may be pushed alongside a rapid code change. An internal repository can also become publicly accessible due to migration, misconfiguration, or administrative error. Even if secrets are later removed, they may still remain in the repository's commit history.&lt;/P&gt;
&lt;P&gt;Whether you are contacted by Dynatrace Security, or discover credential exposure independently, it is important to understand that exposure does not automatically mean compromise. The steps provided in this article are designed to help you validate whether the token(s) was misused before it was rotated or invalidated.&lt;/P&gt;
&lt;H2&gt;Problem&lt;/H2&gt;
&lt;P&gt;Dynatrace may notify you when GitHub Secret Scanning detects a public Dynatrace token exposure. This guide shows how to Validate the exposure, review audit logs for potential misuse, and remediate.&lt;/P&gt;
&lt;H2 id="Prerequisites" data-local-id="18cf060cea71" data-renderer-start-pos="1003"&gt;&lt;STRONG data-renderer-mark="true"&gt;Prerequisite&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P data-local-id="e9b6e171fc01" data-renderer-start-pos="1018"&gt;&lt;EM data-renderer-mark="true"&gt;These steps assume audit logging was enabled prior to the exposure event; if it was not enabled, historical audit visibility may be limited.&lt;/EM&gt;&lt;/P&gt;
&lt;P data-local-id="40e66f086d7f" data-renderer-start-pos="1160"&gt;Before beginning your investigation:&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="1" data-local-id="c98d0afbc591"&gt;
&lt;LI&gt;
&lt;P data-local-id="b3e7b46c1315" data-renderer-start-pos="1200"&gt;Upload our prebuilt Dynatrace notebook that contains ready-to-go queries to your environment&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="14e506d24965" data-renderer-start-pos="12074"&gt;Ensure that &lt;A title="https://docs.dynatrace.com/docs/manage/data-privacy-and-security/configuration/audit-logs-api" href="https://docs.dynatrace.com/docs/manage/data-privacy-and-security/configuration/audit-logs-api" target="_blank" rel="noopener" data-renderer-mark="true"&gt;audit logging&lt;/A&gt; is enabled in the affected environment&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2" data-local-id="c7245bf64961"&gt;
&lt;LI&gt;
&lt;P data-local-id="9c8f8b9f96bd" data-renderer-start-pos="12142"&gt;To enable audit logging&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="3" data-local-id="6f279e070752"&gt;
&lt;LI&gt;
&lt;P data-local-id="01919f6ec34c" data-renderer-start-pos="12169"&gt;Go to Settings -&amp;gt; Preferences -&amp;gt; Log audit events.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="4942c5cefe89" data-renderer-start-pos="12223"&gt;Turn on Log all audit-related system events.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="399e4184d746" data-renderer-start-pos="12271"&gt;You can also enable audit logs via &lt;A class="_ymio1r31 _ypr0glyw _zcxs1o36 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _4bfu1r31 _1hms8stv _ajmmnqa1 _vchhusvi _kqswh2mm _ect4ttxp _syaz13af _1a3b1r31 _4fpr8stv _5goinqa1 _f8pj13af _9oik1r31 _1bnxglyw _jf4cnqa1 _30l313af _1nrm1r31 _c2waglyw _1iohnqa1 _9h8h12zz _10531ra0 _1ien1ra0 _n0fx1ra0 _1vhv17z1" title="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/data-privacy-api/put-configuration" href="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/data-privacy-api/put-configuration" target="_blank" rel="noopener" data-renderer-mark="true"&gt;Data privacy API&lt;/A&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-local-id="2e5f22823258" data-renderer-start-pos="12331"&gt;&lt;STRONG data-renderer-mark="true"&gt;Retention Note:&lt;/STRONG&gt; Dynatrace retains audit logs for 30 days and automatically deletes them afterwards. However, Grail audit events are stored for 1 year.&lt;/P&gt;
&lt;P data-local-id="2e5f22823258" data-renderer-start-pos="12331"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="Required-Permissions" data-renderer-start-pos="12483" data-local-id="42ef68f8952e"&gt;&lt;STRONG data-renderer-mark="true"&gt;Required Permissions&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P data-local-id="058068238b4c" data-renderer-start-pos="12505"&gt;You will need:&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="1" data-local-id="685136037d0f"&gt;
&lt;LI&gt;
&lt;P data-local-id="e541a776d952" data-renderer-start-pos="12523"&gt;auditLogs.read permission (for the Audit Logs API)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="6be0626cfa09" data-renderer-start-pos="12577"&gt;logs.read permission (for Dynatrace DQL log searches)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="e0a97ecb0883" data-renderer-start-pos="12634"&gt;Access to the environment where the token was issued&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="c18cbcc7a53d" data-renderer-start-pos="12690"&gt;For IAM Policy related permissions please review &lt;A class="_ymio1r31 _ypr0glyw _zcxs1o36 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _4bfu1r31 _1hms8stv _ajmmnqa1 _vchhusvi _kqswh2mm _ect4ttxp _syaz13af _1a3b1r31 _4fpr8stv _5goinqa1 _f8pj13af _9oik1r31 _1bnxglyw _jf4cnqa1 _30l313af _1nrm1r31 _c2waglyw _1iohnqa1 _9h8h12zz _10531ra0 _1ien1ra0 _n0fx1ra0 _1vhv17z1" title="https://docs.dynatrace.com/docs/shortlink/audit-logs-grail#permissions" href="https://docs.dynatrace.com/docs/shortlink/audit-logs-grail#permissions" target="_blank" rel="noopener" data-renderer-mark="true"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2" data-local-id="d1af416eff9c"&gt;
&lt;LI&gt;
&lt;P data-local-id="e1f9e8da3e7d" data-renderer-start-pos="12747"&gt;storage:buckets:read&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="835f8aa18cef" data-renderer-start-pos="12771"&gt;storage:logs:read&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-local-id="d0380e324b39" data-renderer-start-pos="12794"&gt;You can verify permissions under:&lt;/P&gt;
&lt;P data-local-id="fb7254c0df6b" data-renderer-start-pos="12829"&gt;Account Management → User Management → Permissions&lt;/P&gt;
&lt;H2 data-local-id="fb7254c0df6b" data-renderer-start-pos="12829"&gt;Troubleshooting Steps&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="Step-1---Reviewing-the-Token-in-the-UI" data-renderer-start-pos="12881" data-local-id="c326398a4a33"&gt;&lt;STRONG data-renderer-mark="true"&gt;Step 1: Reviewing the Token in the UI&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P data-local-id="cbf2435b512c" data-renderer-start-pos="12921"&gt;Navigate to the Access Tokens application in your tenant UI and identify the token that has been exposed. An example for Personal Access Tokens is also provided.&lt;/P&gt;
&lt;P data-local-id="c6d020ec6098" data-renderer-start-pos="13084"&gt;&lt;STRONG&gt;New Dynatrace UI: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-local-id="c6d020ec6098" data-renderer-start-pos="13084"&gt;https://{your-environment-id}.live.dynatrace.com/ui/apps/dynatrace.classic.tokens/ui/access-tokens&lt;/P&gt;
&lt;P data-local-id="a3bc80bf5ceb" data-renderer-start-pos="13202"&gt;https://{your-environment-id}.live.dynatrace.com/ui/apps/dynatrace.classic.personal.access.tokens/ui/personal-access-tokens&lt;/P&gt;
&lt;P data-local-id="84bac836bb9e" data-renderer-start-pos="13327"&gt;&lt;STRONG&gt;Dynatrace Classic UI: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-local-id="84bac836bb9e" data-renderer-start-pos="13327"&gt;https://{your-environment-id}.live.dynatrace.com/ui/access-tokens&lt;/P&gt;
&lt;P data-local-id="23b1cf25f405" data-renderer-start-pos="13416"&gt;https://{your-environment-id}.live.dynatrace.com/ui/personal-access-tokens&lt;/P&gt;
&lt;P data-local-id="75c9e2b11b17" data-renderer-start-pos="13492"&gt;Here you can check:&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="1" data-local-id="c3c4e7fbe00e"&gt;
&lt;LI&gt;
&lt;P data-local-id="892a7b5681b5" data-renderer-start-pos="13515"&gt;Creation date&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="5c217c0fa259" data-renderer-start-pos="13532"&gt;Last used timestamp&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="404f85150310" data-renderer-start-pos="13555"&gt;Last used IP address&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="8e398dc13cbd" data-renderer-start-pos="13579"&gt;Assigned scopes&lt;/P&gt;
&lt;UL class="ak-ul" data-indent-level="2" data-local-id="a035e2f0d531"&gt;
&lt;LI&gt;
&lt;P data-local-id="0094159f0ecc" data-renderer-start-pos="13598"&gt;Token scopes can help estimate the impact of the event at a glance, for example the scope to ingest logs could impact integrity but not confidentiality, because a potential attacker would not have been able to extract data.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-local-id="e75fd75a4cff" data-renderer-start-pos="13827"&gt;Token status (enabled/disabled)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-local-id="c2d126657893" data-renderer-start-pos="13862"&gt;If the token was publicly exposed, it is best to assume it may have been accessible to third parties.&lt;/P&gt;
&lt;P data-local-id="2ba5a4335e46" data-renderer-start-pos="13965"&gt;Our recommendation:&lt;BR /&gt;Immediately disable or delete the token and verify whether the “Last used” timestamp aligns with expected activity.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bez nazwy.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32180i6C71DAA60E31631A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bez nazwy.png" alt="Bez nazwy.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3 id="Step-2---Reviewing-Audit-Logs-via-API" data-renderer-start-pos="14105" data-local-id="afc8c02a9801"&gt;&lt;STRONG data-renderer-mark="true"&gt;Step 2: Reviewing Audit Logs via API&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P data-local-id="715c57410c14" data-renderer-start-pos="14144"&gt;&lt;A class="_ymio1r31 _ypr0glyw _zcxs1o36 _mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y _4bfu1r31 _1hms8stv _ajmmnqa1 _vchhusvi _kqswh2mm _ect4ttxp _syaz13af _1a3b1r31 _4fpr8stv _5goinqa1 _f8pj13af _9oik1r31 _1bnxglyw _jf4cnqa1 _30l313af _1nrm1r31 _c2waglyw _1iohnqa1 _9h8h12zz _10531ra0 _1ien1ra0 _n0fx1ra0 _1vhv17z1" title="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/audit-logs/get-log" href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/audit-logs/get-log" target="_blank" rel="noopener" data-renderer-mark="true"&gt;Audit Logs API Documentation&lt;/A&gt;&lt;/P&gt;
&lt;P data-local-id="b24b9d62aac7" data-renderer-start-pos="14174"&gt;You can retrieve audit events related to token lifecycle activity using the audit logs.&lt;/P&gt;
&lt;P data-local-id="ecd7f7530a1f" data-renderer-start-pos="14264"&gt;Example API Call:&lt;/P&gt;
&lt;DIV class="code-block css-y5zsxb" data-local-id="770762d8e879"&gt;&lt;SPAN class="prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf" aria-label="Scrollable content" data-testid="renderer-code-block" data-ds--code--code-block="" data-code-lang=""&gt;&lt;CODE class="language-" style="white-space: pre;"&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-1"&gt;curl -X 'GET' \
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-2"&gt;"https://{your-environment-id}.live.dynatrace.com/api/v2/auditlogs?filter=category(\"TOKEN\"),entityId(\"{token-id}\")&amp;amp;sort=-timestamp" \
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-3"&gt;-H "accept: application/json; charset=utf-8" \
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-4"&gt;-H "Authorization: Api-Token {your-investigation-token}"
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Important:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use a separate investigation token, not the exposed one
&lt;UL&gt;
&lt;LI&gt;Permissions/scope for the token would be:
&lt;UL&gt;
&lt;LI&gt;auditLogs.read&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Replace {token-id} with the token identifier, not the token secret itself
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;In a Dynatrace token dt0c01.TEST12345678901234567890.TEST123456789012345678901234567890123456789012345678901234567890 the identifier, or public part, in this case would be dt0c01.TEST12345678901234567890&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;This example filters for:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Object category = TOKEN&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Specific token entityId&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Most recent events first&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;If the response includes a nextPageKey, request the next page by using only nextPageKey (do not include filter/sort/pageSize on the next request).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example with Pagination:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;curl -X 'GET' \&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;"https://{your-environment-id}.live.dynatrace.com/api/v2/auditlogs?nextPageKey={PASTE_VALUE_FROM_RESPONSE}" \&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-H 'accept: application/json; charset=utf-8' \&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;-H 'Authorization: Api-Token {your-investigation-token}"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other events to review:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Token Creation&lt;/LI&gt;
&lt;LI&gt;Token Updates&lt;/LI&gt;
&lt;LI&gt;Token Deletion&lt;/LI&gt;
&lt;LI&gt;Config changes that occurred post exposure&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Look for:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Unusual timestamps&lt;/LI&gt;
&lt;LI&gt;Unknown IP addresses
&lt;UL&gt;
&lt;LI&gt;If you observe unfamiliar IPs, compare them against your organization's known IP ranges and consider using your preferred threat intelligence source for further evaluation of suspicious IPs (for example AbuseIPDB or VirusTotal)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;New token creations&lt;/LI&gt;
&lt;LI&gt;Scope modifications&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 3: Investigate with DQL&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Audit Logs&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;If the exposed token was used for ingesting logs, you can search for ingestion activity using:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf" data-testid="renderer-code-block" data-ds--code--code-block="" data-code-lang=""&gt;&lt;CODE class="language-" style="white-space: pre;"&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-1"&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-2"&gt;// Filter for a specific token
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-3"&gt;| filter dt.auth.origin == "&amp;lt;public part of your token&amp;gt;"
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-4"&gt;// Fields to be displayed
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-5"&gt;| fields timestamp,
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-6"&gt;         dt.auth.origin,
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-7"&gt;         content
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-8"&gt;// Sort by timestamp
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-9"&gt;| sort timestamp desc&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;dt.auth.origin is populated for ingestion-related tokens and identifies the token origin used to ingest the log record.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; dt.auth.origin only appears for ingestion related tokens&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Audit Events&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;You can also search audit events stored in Grail:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="prismjs _11c819w5 _2rko12b0 _1dqoglyw _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhk187e _syazi7uo _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srnt0uh _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gsb9t _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909i8nm _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgc124n _bu7z124n _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3wu06 _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eihtd5cb _t9zbd5cb _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t36i7uo _137bh55r _1k7di7uo _97li16jw _12nh9lu1 _1g0517qg _i2igqmo9 _326zi7uo _113p1rpy _1n6t16jw _tgu817qg _1k4716jw _g0lxi7uo _ys4e1rpy _7gp8h55r _1yvqqmo9 _1vwwqmo9 _1rjuqmo9 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o6qmo9 _kxov17qg _1np517qg _m2f517qg _1b9t16jw _1tq616jw _1rd216jw _1pbk16jw _k3li16jw _13zt1rpy _2g12fb2s _k86bqmo9 _b5iy1rpy _gti31rpy _1f0g16jw _9d3e17qg _qdia16jw _72uv16jw _13dgkb7n _1707efft _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf" data-testid="renderer-code-block" data-ds--code--code-block="" data-code-lang=""&gt;&lt;CODE class="language-" style="white-space: pre;"&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-1"&gt;fetch dt.system.events
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-2"&gt;// Narrow scope to audit events only
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-3"&gt;| filter event.kind == "AUDIT_EVENT"
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-4"&gt;// Filter down to view only the desired token
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-5"&gt;| filter authentication.token == "&amp;lt;public part of your token&amp;gt;"
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-6"&gt;// Sort by timestamp
&lt;/SPAN&gt;&lt;SPAN class="" data-ds--code--row="" data-testid="renderer-code-block-line-7"&gt;| sort timestamp desc&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;From these results, you may be able to identify:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;When a token was last used&lt;/LI&gt;
&lt;LI&gt;The IP address associated with authentication&lt;/LI&gt;
&lt;LI&gt;Failed authentication attempts&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Resolution&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;The same steps are recommended for all public token exposures. Perform containment before investigation to ensure that, even if no breach has occurred yet, the exposed token cannot be abused going forward:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Always revoke all exposed tokens as soon as possible
&lt;UL&gt;
&lt;LI&gt;As long as an exposed token is valid, it can be abused&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Rotate credentials as necessary
&lt;UL&gt;
&lt;LI&gt;Create replacement tokens with least privilege, update integrations, and validate everything still works&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Delete the token from code/config and re-write commit history if it was committed. Consider making the repository private if appropriate, and ensure forks/branches do not still contain the secret&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If no suspicious activity is found, revoking the exposed token(s), rotating replacements, and removing the secret from the repo/history is typically sufficient for resolution.&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If suspicious activity is detected, follow your organization's incident response process. The troubleshooting steps in this guide can help identify actions performed using the token.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If the exposed token had permission to create/modify tokens, or to change permissions, revoke any newly created tokens and remove any unauthorized access&lt;/LI&gt;
&lt;LI&gt;In call cases, revoking the exposed token(s) stops further use of those credentials&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;What's next&lt;/H2&gt;
&lt;P&gt;If this article did not help, please open a support ticket, mention that this article was used and provide the following in the ticket:&lt;/P&gt;
&lt;DIV class="p-client_container"&gt;
&lt;DIV class="p-ia4_client_container"&gt;
&lt;DIV class="p-ia4_client p-ia4_client--with-search-in-top-nav p-ia4_client--workspace-switcher-rail-visibletest p-ia4_client--sidebar-wide p-ia4_client--narrow-feature-on"&gt;
&lt;DIV class="p-client_workspace_wrapper" role="tabpanel" aria-label="Dynatrace"&gt;
&lt;DIV class="p-client_workspace" role="tabpanel" aria-label="DMs"&gt;
&lt;DIV class="p-client_workspace__layout"&gt;
&lt;DIV class="active-managed-focus-container" role="none"&gt;
&lt;DIV class="p-view_contents p-view_contents--primary" tabindex="-1" role="dialog" aria-label="Conversation with Anton Konikov"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="tabbed_channel__Abx5r"&gt;
&lt;DIV class="channel_tab_panel__zJ5Bt c-tabs__tab_panel c-tabs__tab_panel--active c-tabs__tab_panel--full_height" role="none" data-qa="tabs_content_container"&gt;
&lt;DIV class="p-file_drag_drop__container"&gt;
&lt;DIV class="p-workspace__primary_view_body"&gt;
&lt;DIV class="p-message_pane p-message_pane--classic-nav p-message_pane--scrollbar-float-adjustment p-message_pane--with-bookmarks-bar" data-qa="message_pane"&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV class="c-virtual_list c-virtual_list--scrollbar c-message_list c-message_list--floating c-message_list--dark c-scrollbar c-scrollbar--fade" role="presentation"&gt;
&lt;DIV class="c-scrollbar__hider" role="presentation" data-qa="slack_kit_scrollbar"&gt;
&lt;DIV class="c-scrollbar__child" role="presentation"&gt;
&lt;DIV class="c-virtual_list__scroll_container" tabindex="-1" role="list" data-qa="slack_kit_list" aria-label="Anton Konikov (direct message, active)"&gt;
&lt;DIV id="1734101723.604509" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1734101723.604509"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;UL class="p-rich_text_list p-rich_text_list__bullet p-rich_text_list--nested" data-stringify-type="unordered-list" data-list-tree="true" data-indent="0" data-border="1" data-border-radius-top-cap="0"&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;An authorized contact on the ticket: Add a user who can view audit logs and any required sensitive/security data in the tenant&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Link to the affected tenant&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Approximate date/time the secret may have been exposed and the timeframe you reviewed in the audit logs&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;What you have already done, whether the token was revoked, replacements created/updated, and whether the commit history was rewritten/purged&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="1"&gt;Where you are blocked, the specific step/section of this article.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Security note:&amp;nbsp;&lt;/STRONG&gt;Do not paste tokens into the ticket or support chat. Please obfuscate or omit any secrets from screenshots/logs.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Mar 2026 11:58:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-Investigate-an-Exposed-Dynatrace-API-Token/ta-p/295528</guid>
      <dc:creator>ZackCompora</dc:creator>
      <dc:date>2026-03-05T11:58:47Z</dc:date>
    </item>
  </channel>
</rss>

