question

MDSaif-8182 avatar image
0 Votes"
MDSaif-8182 asked MDSaif-8182 edited

Azure Resource Graph Api is not giving same output as Azure Resource Graph Explorer(in portal)

I am calling this API - POST https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01

with the JSON body as :

{
"subscriptions": [
"subscription id"
],
"query": "Resources | summarize count()"
}

But I am getting this response :
{
"totalRecords": 1,
"count": 1,
"data": {
"columns": [
{
"name": "count_",
"type": "integer"
}
],
"rows": [
[
0
]
]
},
"facets": [],
"resultTruncated": "false"
}

But in the Azure Resource Graph Explorer(in portal) I am able to get the count properly.

Please help me with this issue.

Thanks

microsoft-graph-files
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Adding right tags/teams to assist

0 Votes 0 ·

0 Answers