# Add email address  to audit logs in Dynatrace SaaS

**URL:** <https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538>\
**Category:** Open Q&A\
**Tags:** oneagent, javascript\
**Created:** [July 10, 2024, 3:49pm UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538 "2024-07-10T15:49:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinashpodisett](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@avinashpodisett](https://community.dynatrace.com/u/avinashpodisett)\
**Post date:** [July 10, 2024, 3:49pm UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538/1 "2024-07-10T15:49:09Z")

</div>

Pain Journey: Need to write a javascript code snippet to do a look-up on audit logs to find the user email address

Benefit: having an email ID simplifies a few things. Easy to communicate and will be able to track activity

Solution Journey:

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [July 10, 2024, 8:58pm UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538/2 "2024-07-10T20:58:27Z")

</div>

This is partially completed in the UI. If you go to the entity in question and then see the revision history, you can see the email address of the changer.

This should also be present in the Json pull but you may need to split that out. There is also the services portal but that has its own limitations for the SaaS customers.

 ![ChadTurner_0-1720645094802.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/8/9878f770e8dbd6813f5f3b465eac69357dbcd0fc.png)

---

<div class="post-metadata">

**Author:** ![avinashpodisett](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@avinashpodisett](https://community.dynatrace.com/u/avinashpodisett)\
**Post date:** [July 11, 2024, 2:13pm UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538/3 "2024-07-11T14:13:52Z")

</div>

Hi Chad,&nbsp;  
&nbsp;thanks for responding..we would like to go through all logs in last 7 days and find out if any users made any changes to the environment. so&nbsp; this solution won’t work for us.  
thanks again  
Avi

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [July 11, 2024, 2:22pm UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538/4 "2024-07-11T14:22:52Z")

</div>

[@avinashpodisett](https://community.dynatrace.com/user/71840)&nbsp;thanks for your reply, im excited to share with you that this is available via the API.

If you navigate to API V2 and select the audit logs, you can put in your time frame analysis. I put in 1 entry in the last 2 hours to cut down my query and amount of data i needed to mask.

 ![ChadTurner_0-1720707528617.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/e/ee4e59f97ff2d6e37cece606459253e3b2dfd31e.png)

The results will be raw, but you can ingest that into excel and break it down into the following results:

 ![ChadTurner_1-1720707667506.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/3/f39f39d1002a0fbb0cb801b0e69d94151db0a022.png)

As mentioned this is really simplistic as it is login, once you pull that data set you can then massage it as needed. Exclude login/logout, include create, modify etc… But i think this is the solution that you are seeking. You can then leverage the sorting’s and filtering segments inside excel. I hope this helps 🙂 In excel I use the data ingest for Json and then break it all out collectively.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [July 11, 2024, 2:26pm UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538/5 "2024-07-11T14:26:09Z")

</div>

If people are making changes by way of tokens, you will be stuck with Token ID’s but if you have an effective naming convention you can then convert the token ID to the named owner of the token or if you created for a user, you can attribute the friendly name to the token entry.

---

<div class="post-metadata">

**Author:** ![jegron](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jegron/32/12797_2.png) [@jegron](https://community.dynatrace.com/u/jegron)\
**Post date:** [August 27, 2024, 9:18am UTC](https://community.dynatrace.com/t/add-email-address-to-audit-logs-in-dynatrace-saas/46538/6 "2024-08-27T09:18:49Z")

</div>

Dynatrace now provides an application called “Privacy Rights” for storing audit logs in Grail and viewing the results:

- [Sensitive Data Center — Dynatrace Docs](https://docs.dynatrace.com/docs/manage/data-privacy-and-security/data-privacy/privacy-rights)
- [https://www.dynatrace.com/hub/detail/privacy-rights/](https://www.dynatrace.com/hub/detail/privacy-rights/)
