Thank you for reaching out.
I understand you wish to download the current Azure Private and Public DNS zones record mappings.If my understanding above is correct, have you explored the options below and see if that satisfies your requirements.
- Export DNS zone file via portal : https://learn.microsoft.com/en-us/azure/dns/dns-import-export-portal
- Rest API call Record Sets - List All By Dns Zone which will list all record sets in a DNS zone in JSON format.
If above does not satisfy your requirement it will help if you could share more details on what automation, you are trying to achieve here. Thanks