How long will it take for changes to appear in the Azure Resources - List REST API output after a new resource is created?

Ajin Martin-FT 1 Reputation point
2022-06-24T13:02:14.743+00:00

For our resource tracking projects, we use the Rest API described in the following documentation.
https://learn.microsoft.com/en-us/rest/api/resources/resources/list
However, some resources are still not listed even after a day since they were created. When we use the same API a few days later, it is reflected.

Can somebody shed some light on why this is happening?

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,028 questions
Azure ISV (Independent Software Vendors) and Startups
Azure ISV (Independent Software Vendors) and Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.ISV (Independent Software Vendors) and Startups: A Microsoft program that helps customers adopt Microsoft Cloud solutions and drive user adoption.
111 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 19,691 Reputation points
    2022-06-27T06:51:03.677+00:00

    Hi @Ajin Martin-FT ,

    Thank you for reaching out to Microsoft Q&A for this question.

    Generally, it takes a few minutes for a new resource to appear in Portal and be listed through the REST API mentioned here. Infact, the portal uses similar API calls to refresh the view after you have created resource.

    Based on the symptom mentioned in the question above, that the resources do no get listed using this API, pagination could be one of the reasons for it. The Resources - List returns the following as resoponse:
    * nextLink <-- The URL to use for the next set of results
    * value <-- the array of resources

    In some cases, the first response might be smaller/contain no resource at all but includes a nextLink in the reply. This mainly happens because the API might initiate lookup in multiple storage/dataSources. Therefore, you should not rely on the response alone and should use the nextLink to get the next set of resources. You may also refer to this link for details on Pagination with ARM APIs

    In case the above answer does not help you with your issue, I would suggest reaching out to Microsoft Support for detailed investigation of the cause for your Subscription/Resources. Please let me know if you face any issues reaching out to Microsoft Support for it.

    Please let me know if you have any questions.


    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.