0

When returning all disks within a subscription, I noticed that not all resources are listed. When comparing to the GUI I can see more resources than there are returned in my API call.

Does Azure 'Hide' resources from the API when created by certain people with certain permission? Or is there something I'm missing?

Luciana Oliveira
  • 822
  • 4
  • 14
  • 35
Lars
  • 1
  • 1
  • Could you share the script you have used? And are you logging in via the same account, as it could be a permission issue also. It could also be a paging-limit, when a list contains more as 1000 items, you'll receive a `nextLink` property with a URL. – Jan_V Oct 18 '22 at 12:00
  • I think you might be right when you say it is possible that I have reached the limit. When performing this call https://management.azure.com/subscriptions/${SUBSCRIPTION-ID}/providers/Microsoft.Compute/disks?api-version=2021-12-01 I received about 9000 Lines of output and in the end this output the last line looked like this. "nextLink": "https://management.azure.com:443/subscriptions/{skipkey}/providers/Microsoft.Compute/disks?api-version=2021-12-01/Subscriptions/{SUBSCRIPTION}/ResourceGroups/{rg}/Disks/{DISK} So this mean I have reached the limit? – Lars Oct 19 '22 at 12:21
  • Would it be possible to get all the info in one page (Other api call, different option within api call?) Because this complicates things by a lot for my project. – Lars Oct 19 '22 at 14:04
  • I don't think there is a way/endpoint to circumvent the paging via the API. You could try doing it via Azure PowerShell/CLI (example over here: https://stackoverflow.com/q/69962836/352640). I think the Portal also implements paging, so you have to navigate through hundreds of pages when you have lots of resources matching your query. – Jan_V Oct 21 '22 at 08:24

0 Answers0