简体   繁体   中英

What api to use when getting Microsoft 365 subscription price (i.e Office 365 Business Essentials - $6 / per user per month)

I am working on an application that will try to calculate a customers annual cost base on his/her office 365 subscription, so far I am able to retrieve the customer's subscription using this api

GET https://graph.microsoft.com/beta/subscribedSkus

Sample response:

{
"@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"
            }
        ]
    }
]
}

but I am not able to retrieve the subscription cost. I tried to scan through all of microsoft graph api reference but to no avail. Is there a way for me to retrieve the cost of a subscription from microsoft graph api or are there any other api's i need to call?.

You can try the azure Usage Details API for your requirement. No graph api for this now, if you still want to use graph API, submit one feature request on the UserVoice .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM