question

SrinivasGamidi-5445 avatar image
0 Votes"
SrinivasGamidi-5445 asked saldana-msft edited

graph api query or filter subscribedSku by skuPartNumber

I have requirement to get the consumed units and prepaid units enabled based on skuPartNumber using graph api. is there way to apply query or filter conditions along with https://graph.microsoft.com/v1.0/subscribedSkus

microsoft-graph-usersmicrosoft-graph-peoplemicrosoft-graph-query-parameters
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.

ZehuiYaoMSFT-7151 avatar image
0 Votes"
ZehuiYaoMSFT-7151 answered ZehuiYaoMSFT-7151 edited

Hello @SrinivasGamidi-5445, according to the documentation, this method currently supports a $select parameter to customize the response.

186834-image.png

And I tested locally with the endpoint: https://graph.microsoft.com/v1.0/subscribedSkus?$select=capabilityStatus,skuPartNumber,consumedUnits,prepaidUnits to fetch the properties capabilityStatus,skuPartNumber,consumedUnits,prepaidUnits like below. Hope it is helpful to you.

186814-image.png



If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (13.1 KiB)
image.png (166.3 KiB)
· 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.

Hello @SrinivasGamidi-5445 ,did the answer above help you? please comment here if you still have an questions.

0 Votes 0 ·
DupyBrian-5447 avatar image
0 Votes"
DupyBrian-5447 answered

Nice! Great for keeping others not in IT (finance) notified when the licenses are getting low.

Is it possible to filter the prepaidUnits down to just "enabled"?

I'm still fairly new to the Graph queries and would just like to flatten the data to have skupartnumber and enabled on the same tier.

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.