graph api query or filter subscribedSku by skuPartNumber

Srinivas Gamidi 1 Reputation point
2022-03-25T05:52:42.82+00:00

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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,831 Reputation points
    2022-03-25T07:17:05.173+00:00

    Hello @Srinivas Gamidi , 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.


  2. Anonymous
    2022-06-23T15:06:14.943+00:00

    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.

    0 comments No comments