User1724605321 posted
Hi umangkachrani,
Subscription SKU IDs and plan IDs can be read from the tenant object. For example, performing a GET request to
https://graph.windows.net/myorganization/subscribedSkus returns the subscriptions available for the tenant of the signed-in user. These are returned as SubscribedSku entities and the SKU
ID can be read from the skuId property. In client library , you could firstly get the subscribedSkus information available for the tenant :
IPagedCollection<ISubscribedSku> pagedCollection = await client.SubscribedSkus.ExecuteAsync();
List<SubscribedSku> skulist = new List<SubscribedSku>();
if (pagedCollection != null)
{
do
{
List<ISubscribedSku> skus = pagedCollection.CurrentPage.ToList();
foreach (ISubscribedSku sku in skus)
{
skulist.Add((SubscribedSku)sku);
}
pagedCollection = await pagedCollection.GetNextPageAsync();
} while (pagedCollection != null);
}
Then you could get the skuPartNumber property from according to the AssignedLicense of current user :
foreach (var item in user.AssignedLicenses)
{
var value = skulist.Single(x=>x.SkuId==item.SkuId).SkuPartNumber;
}
Best Regards,
Nan Yu