2
votes

Using the Microsoft Graph API I can see the contracts of my organization when I execute:

https://graph.microsoft.com/v1.0/contracts

A Sample Response below:

"value": [
{
"id": "107adc54-f77c-4b8b-9cc0-1759e8d0cdfer",
"deletedDateTime": null,
"contractType": "2",
"customerId": "75ace3eb-6bf4-4655-95fd-f3d0610924789",
"defaultDomainName": "test.onmicrosoft.com",
"displayName": "Test Me"
}

How can i query the subscribedskus of the above contract via Graph API. is this even possible?

I tried

https://graph.microsoft.com/v1.0/test.onmicrosoft.com/subscribedSkus

But it returns the skus my organization is subscribed to and not the ones subscribed by test.onmicrosoft.com.

Please assist.

1

1 Answers

0
votes

Let me answer this based on the R&D that i have been doing for past several days. I dont think that Microsoft Graph API currently supports any additional operations on the Contracts object as the contracts documentation link https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/contract lists only 2 methods Get contract and List contracts

As of now the only option to fetch the subscribed skus of each of the contract is by accessing the azure ad instance of each tenant using the respective tenantid (obtaining the access token using the endpoint https://login.microsoftonline.com/<tenantid>/oauth2/token and firing the REST call https://graph.microsoft.com/v1.0/subscribedSkus)