Clarification on Mapping Subscription Data with /subscribedskus API Response

Saqib Rajput 0 Reputation points
2025-11-05T14:21:22.81+00:00

Hi Team,

I am currently integrating the API that returns the availableUnits value:

https://learn.microsoft.com/en-us/partner-center/developer/get-a-list-of-available-licenses

The API is returning the product and license details correctly. However, the response does not include any value that directly matches with the subscriptionId. Because of this, we are not able to store the license information against the correct subscription in our system.

For example, in our sandbox:

Tenant ID: <PII removed>

Subscription ID: <PII removed>

Offer ID: <PII removed>

API Response /v1/customers/{tenantId}/subscribedskus returns the productSku.id and skuPartNumber (e.g., ENTERPRISEPREMIUM) but there is no field that ties this back to the subscriptionId.

Please advise which identifier is recommended by Microsoft for linking these two datasets.

Once confirmed, I will complete the implementation.

Thanks,

Developer technologies | ASP.NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Danny Nguyen (WICLOUD CORPORATION) 5,065 Reputation points Microsoft External Staff Moderator
    2025-11-06T09:48:45.41+00:00

    Hi @Saqib Rajput ,

    You’re seeing expected behavior. The /v1/customers/{tenantId}/subscribedskus endpoint exposes tenant‑level (pooled) license information per product SKU. It doesn’t include or map back to individual subscriptionId values because seat usage isn’t tracked per subscription—only at the SKU pool level.

    I think you would have to scrape the data and merge them yourself:

    1. Load the two endpoint responses into two tables:
    2. Join on productSkuId (subscribedskus.productSku.id = subscriptions.productSkuId) and aggregate.

    Conceptual

    
    SELECT
    
      pool.productSkuId,
    
      pool.skuPartNumber,
    
      SUM(sub.quantity) AS totalPurchasedSeats,
    
      pool.activeUnits,
    
      pool.availableUnits
    
    FROM SubscribedSkuPool pool
    
    JOIN Subscriptions sub
    
      ON sub.productSkuId = pool.productSkuId
    
    GROUP BY
    
      pool.productSkuId,
    
      pool.skuPartNumber,
    
      pool.activeUnits,
    
      pool.availableUnits;
    
    

    If this approach doesn't work out for you, please consider reaching out to partner center support https://learn.microsoft.com/en-us/partner-center/support/report-problems-with-partner-center

    Hope this helps.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.