# Extracting Management Zone IDs from Dynatrace SaaS Tenant

**URL:** <https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516>\
**Category:** Dynatrace API\
**Tags:** dql, management-zones, dynatrace-managed, dynatrace-api\
**Created:** [February 28, 2025, 6:10pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516 "2025-02-28T18:10:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sajarra](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sajarra](https://community.dynatrace.com/u/Sajarra)\
**Post date:** [February 28, 2025, 6:10pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/1 "2025-02-28T18:10:36Z")

</div>

Hello Team,

Could you please advise how to extract Management Zone IDs (not the Object IDs) from Dynatrace either by Data Explorer /DQL or API? Tried using API but it’s giving only the Object IDs, not the management zone IDs. Thank you.

---

<div class="post-metadata">

**Author:** ![KeeganNelson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/keegannelson/32/20333_2.png) [@KeeganNelson](https://community.dynatrace.com/u/KeeganNelson)\
**Post date:** [February 28, 2025, 7:06pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/2 "2025-02-28T19:06:09Z")

</div>

Hello Sajarra.

If you head over to the management zone settings (Settings \> Preferences \> Management Zones \> Management Zones Settings) and expand one of the management zones, you’ll be able to see the ID.

 ![KeeganNelson_0-1740769553337.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/7/27c47f3054b697cf6fe677fabee7f1b578016888.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Sajarra](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sajarra](https://community.dynatrace.com/u/Sajarra)\
**Post date:** [February 28, 2025, 7:22pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/3 "2025-02-28T19:22:08Z")

</div>

Thank you for your inputs.. I need to extract the mzIDs for all the MZs (400+) within our environment.

---

<div class="post-metadata">

**Author:** ![KeeganNelson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/keegannelson/32/20333_2.png) [@KeeganNelson](https://community.dynatrace.com/u/KeeganNelson)\
**Post date:** [February 28, 2025, 8:20pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/4 "2025-02-28T20:20:02Z")

</div>

Could I ask the use case for extracting all the mzID’s it may help in finding a solution.

---

<div class="post-metadata">

**Author:** ![Sajarra](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sajarra](https://community.dynatrace.com/u/Sajarra)\
**Post date:** [February 28, 2025, 8:38pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/5 "2025-02-28T20:38:38Z")

</div>

We are collecting few SLO/Infrastructure metrics from Dynatrace through a Python Script (Based on AppCodes). Since we kept our Prod and DR servers in different MZs, the output is with multiple mzIDs.. To filter Prod data, we needed the mzIDs.

---

<div class="post-metadata">

**Author:** ![KeeganNelson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/keegannelson/32/20333_2.png) [@KeeganNelson](https://community.dynatrace.com/u/KeeganNelson)\
**Post date:** [March 3, 2025, 7:36pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/6 "2025-03-03T19:36:56Z")

</div>

Found this community post it may help.&nbsp;  
[Solved: Management Zone ID using Settings Objects Endpoint - Dynatrace Community](https://community.dynatrace.com/post/233958)

---

<div class="post-metadata">

**Author:** ![Sajarra](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sajarra](https://community.dynatrace.com/u/Sajarra)\
**Post date:** [March 6, 2025, 7:54pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/7 "2025-03-06T19:54:27Z")

</div>

Thank you but it’s not solving the issue. Through Dynatrace APIs, I’m unable to extract the mzIDs.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [March 7, 2025, 8:21am UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/8 "2025-03-07T08:21:27Z")

</div>

Hi,

If you want to filter production data, I would suggest you filter using tags.

Best regards

---

<div class="post-metadata">

**Author:** ![Sajarra](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sajarra](https://community.dynatrace.com/u/Sajarra)\
**Post date:** [March 7, 2025, 2:29pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516/9 "2025-03-07T14:29:08Z")

</div>

_Yes, I can extract the problem events with ‘Tags’. Looks like we don’t have any options to extract the mzIDs from Dynatrace. Working with Dynatrace consultant for our team and he is checking with Dynatrace Dev (API team). Thank you all your supports._

_fetch dt.davis.problems_  
_| fieldsAdd entity.type, timestamp, host.name, display\_id, affected\_entity\_ids, affected\_entity\_types, Description_  
_| filter matchesValue(entity\_tags,“AppCode:XXX”)_  
_| sort event.status asc_
