我正在开发一个应用程序,该应用程序将尝试根据其Office 365订阅来计算客户的年度费用,到目前为止,我已经能够使用此api检索客户的订阅
GET https://graph.microsoft.com/beta/subscribedSkus
示例响应:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#subscribedSkus",
"value": [
{
"capabilityStatus": "Enabled",
"consumedUnits": 10,
"id": "db832e68-9b3c-4322-befc-2a864ba73551_3b555118-da6a-4418-894f-7df1e2096870",
"skuId": "3b555118-da6a-4418-894f-7df1e2096870",
"skuPartNumber": "O365_BUSINESS_ESSENTIALS",
"appliesTo": "User",
"prepaidUnits": {
"enabled": 10,
"suspended": 0,
"warning": 0
},
"servicePlans": [
{
"servicePlanId": "54fc630f-5a40-48ee-8965-af0503c1386e",
"servicePlanName": "KAIZALA_O365_P2",
"provisioningStatus": "PendingProvisioning",
"appliesTo": "User"
},
{
"servicePlanId": "3c53ea51-d578-46fa-a4c0-fd0a92809a60",
"servicePlanName": "STREAM_O365_SMB",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "c63d4d19-e8cb-460e-b37c-4d6c34603745",
"servicePlanName": "OFFICEMOBILE_SUBSCRIPTION",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "5e62787c-c316-451f-b873-1d05acd4d12c",
"servicePlanName": "BPOS_S_TODO_1",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "159f4cd6-e380-449f-a816-af1a9ef76344",
"servicePlanName": "FORMS_PLAN_E1",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "0f9b09cb-62d1-4ff4-9129-43f4996f83f4",
"servicePlanName": "FLOW_O365_P1",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "92f7a6f3-b89b-4bbd-8c30-809e6da5ad1c",
"servicePlanName": "POWERAPPS_O365_P1",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "57ff2da0-773e-42df-b2af-ffb7a2317929",
"servicePlanName": "TEAMS1",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "b737dad2-2f6c-4c65-90e3-ca563267e8b9",
"servicePlanName": "PROJECTWORKMANAGEMENT",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "a23b959c-7ce8-4e57-9140-b90eb88a9e97",
"servicePlanName": "SWAY",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "882e1d05-acd1-4ccb-8708-6ee03664b117",
"servicePlanName": "INTUNE_O365",
"provisioningStatus": "PendingActivation",
"appliesTo": "Company"
},
{
"servicePlanId": "e95bec33-7c88-4a70-8e19-b10bd9d0c014",
"servicePlanName": "SHAREPOINTWAC",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "7547a3fe-08ee-4ccb-b430-5077c5041653",
"servicePlanName": "YAMMER_ENTERPRISE",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "9aaf7827-d63c-4b61-89c3-182f06f82e5c",
"servicePlanName": "EXCHANGE_S_STANDARD",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "0feaeb32-d00e-4d66-bd5a-43b5b83db82c",
"servicePlanName": "MCOSTANDARD",
"provisioningStatus": "Success",
"appliesTo": "User"
},
{
"servicePlanId": "c7699d2e-19aa-44de-8edf-1736da088ca1",
"servicePlanName": "SHAREPOINTSTANDARD",
"provisioningStatus": "Success",
"appliesTo": "User"
}
]
}
]
}
但是我无法检索订阅费用。我试图扫描所有的Microsoft图形API参考,但无济于事。 有没有办法让我从Microsoft图形api检索订阅的费用,或者我需要调用其他任何api?
答案 0 :(得分:0)
您可以根据需要尝试使用Azure Usage Details API。 现在还没有图形API,如果您仍要使用图形API,请在UserVoice上提交一个功能请求。