none
How get get all service plans across all licenses in my organization

    Question

  • I have several licenses and I see that there is an api to get the subscribedSkus  

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

    which gives data like 

    value": [
        {
          "capabilityStatus": "capabilityStatus-value",
          "consumedUnits": 99,
          "prepaidUnits": {
            "enabled": 99,
            "suspended": 99,
            "warning": 99
          },
          "servicePlans": [
            {
              "servicePlanId": "servicePlanId-value",
              "servicePlanName": "servicePlanName-value",
              "provisioningStatus": "provisioningStatus-value",
              "appliesTo": "appliesTo-value"
            }
          ],
          "skuId": "skuId-value",
          "skuPartNumber": "skuPartNumber-value"
        }

    I have two questions.

    1) Can I have two serviceplans with the same name under two separate skus?

    like one  

    {
              "servicePlanId": "238",
              "servicePlanName": "YAMMER",
              "provisioningStatus": "provisioningStatus-value",
              "appliesTo": "appliesTo-value"
            }

    and  other 

    {
              "servicePlanId": "1234,
              "servicePlanName": "YAMMER",
              "provisioningStatus": "provisioningStatus-value",
              "appliesTo": "appliesTo-value"
            }

    but both linked to two different skus.

    2) Is there an api which gives me the paginated list service plans in my tenant associated will all licenses in the system. Another way to ask this is that is there a way I can get access to Serviceplans directly with out going through the skus

    Thanks

    George S 

      

     
    Thursday, March 2, 2017 1:21 PM

All replies

  • The answer to your first question is yes, you can have the same service plan in different SKUs (e.g. EMS E3 and EMS E5 both include the "AAD_PREMIUM" service plan).

    To list all of the service plans in your tenant, you would look at the assignedPlans property of the organization entity (https://graph.microsoft.com/v1.0/organization): 

    • https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/organization_get

    (EDIT: A previous version of this answer said you needed to iterate over the subscribedSkus, which is incorrect. I had completely forgotten that you can, actually, get this directly from the /organization entity.)



    Friday, March 3, 2017 8:04 AM
  • Thanks for the clarification. 

    But how will I paginate like get 20 first get next 20 etc

    Friday, March 10, 2017 7:46 PM