Need an API to get all the non-hidden resources from the azure subscription.

Rajat Saxena (NON EA SC ALT) 41 Reputation points

Hi team,

I have a requirement where I need an API to get all the non-hidden resources from the subscription. I have gone through the documentation and find an API: GET{subscriptionId}/resources?api-version=2021-04-01 which gives all the resources from the subscription, but it also contains hidden resources and I’m not able to figure out how to differentiate hidden resources from the response as no unique identifier/flag is present for hidden/non-hidden resource.


Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,224 questions
0 comments No comments
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 22,956 Reputation points

    Hi @Rajat Saxena (NON EA SC ALT) Thanks for reaching out. Currently its only supported in the Azure portal, the user can choose to include or exclude hidden resources in the list by checking the box.
    The rest api call GET{subscriptionId}/resources?api-version=2021-04-01 provides all the resources under the subscription we don't have any filter query that allows any sort of "hidden" property to be passed to filter on the server either through rest api call / Az powershell command.

    we have the following github threads discussing the same,

    feel free to provide your feedback at our feedback forum so that other users who are in need to similar feature can upvote it and Product group team can take it forward.

    let me know incase in of further queries, I would be happy to assist you.

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

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful