Share via

Use KQL dnsresource not return new record

Binh Nguyen 20 Reputation points
2026-03-30T03:53:47.2366667+00:00

dnsresources

| where id contains '/dnsZones/a.com'

| project name, id, properties

| order by name asc

I've been using dnsresource, but I've found that it has eventual consistency issues. I've created a new record set, but when I query it, It doesn't return results immediately like using the kql dnszone resource query. It takes a very long time. Does anyone know how to fix this? Please share your solution with me.

Azure Data Explorer
Azure Data Explorer

An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.


Answer accepted by question author
  1. Venkatesan S 7,175 Reputation points Microsoft External Staff Moderator
    2026-03-30T04:28:56.8533333+00:00

    Hi Binh Nguyen,

    Thanks for reaching out in Microsoft Q&A forum,

    The dnsresources table in Azure Resource Graph is eventually consistent, so newly created record-sets can take several minutes (typically up to 10–15 minutes) to show up in your KQL queries. Unfortunately there’s no “tweak” you can do in your dnsresources query to force it to be real-time.

    Here are a couple of options to get immediate visibility on your new record set:

    1. Use the Azure DNS data-plane APIs (or CLI/PowerShell) to fetch the record directly from ARM
      • Azure CLI example:
             az network dns record-set A show   
               --resource-group MyRG \  
               --zone-name a.com \  
               --name myrecord  
        
      • PowerShell example:
             Get-AzDnsRecordSet -ResourceGroupName MyRG -ZoneName a.com -Name myrecord -RecordType A
        
        These calls hit the DNS service directly and are always current.
    2. If you need to continue using Resource Graph, you’ll have to wait for the resource graph cache to update. There isn’t an API or query hint today to force an immediate refresh.
    3. (Alternative) Enable DNS diagnostics and send record-set change logs into Log Analytics or Storage. Then query the Log Analytics tables for record changes – those logs arrive in near-real time.

    Hope that helps!

    Update:

    You can see the document they clearly told only private DNS used to query and public DNS zone are not applicable here.

    https://learn.microsoft.com/en-us/azure/dns/private-dns-arg

    User's image

    Reference list

    Kindly let us know if the above helps or you need further assistance on this issue.

    Please do not forget to 210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-30T03:54:01.44+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    dnsresources is backed by the Azure Resource Graph index, which is eventually consistent. New or updated DNS record sets (Microsoft.Network/dnsZones/A and others) can take time to appear in Resource Graph queries, while control-plane APIs or direct DNS zone queries may show them sooner.

    There is no configuration switch or KQL change that forces dnsresources to return newly created records immediately. The behavior is by design:

    • dnsresources queries the indexed resource metadata, not the live DNS zone.
    • Indexing latency can cause delays between creating a record set and seeing it in dnsresources.

    Workarounds and operational guidance:

    1. For near-real-time verification of new records, use the Azure DNS control plane (for example, Azure Portal DNS zone view or management APIs) instead of dnsresources.
    2. Allow for propagation time in any automation that relies on dnsresources; add retries with backoff before assuming a record is missing.
    3. If a record never appears in dnsresources after a reasonable period while it is visible in the DNS zone, open a support case, as that indicates an indexing issue rather than KQL behavior.

    The DNS resource types and properties (such as Microsoft.Network/dnsZones/A with RecordSetProperties and ARecords) are correctly surfaced through Resource Graph once indexing completes, but the platform does not provide a way to bypass eventual consistency.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.