admin管理员组

文章数量:1291716

Assume a customer has 3 subscriptions:

Exchange Online (Plan 1)

Microsoft 365 E3

Microsoft Teams Room Pro

In the admin portal (/) I can see the subs and counts and such. If I click into Exchange Online Plan 1 The url in my browser changes to:

#/subscriptions/assets/1f623e61-6645-4d63-d853-XXYZ?skipReload=true

Note the ID after assets.

Now, If i use the Graph API and list all subscriptions, I do see the Exchange online Plan 1, but the subscription ID is different.

$url =".0/directory/subscriptions";

stdClass Object
(
[@odata.context] => .0/$metadata#directory/subscriptions
[value] => Array
    (
        [0] => stdClass Object
            (
                [createdDateTime] => 2023-04-27T15:27:35Z
                [commerceSubscriptionId] => 1234567-de25-4aff-858c-AABBCCDD
                [id] => 123456-2a6d-4630-9931-SomethingNotCloseToOtherId
                [isTrial] => 
                [nextLifecycleDateTime] => 2025-04-03T00:00:00Z
                [skuId] => c5928f49-12ba-48f7-ada3-0d743a3601d5
                [skuPartNumber] => SomeExchangeSKu
                [status] => Enabled
                [totalLicenses] => 5
                [ownerTenantId] => 
                [ownerId] => 
                [ownerType] => 
                [serviceStatus] => Array

I would expect the id parameter do be the same as the id I saw in the url. Am I calling the wrong endpoint? What am I missing?

Assume a customer has 3 subscriptions:

Exchange Online (Plan 1)

Microsoft 365 E3

Microsoft Teams Room Pro

In the admin portal (https://admin.microsoft/) I can see the subs and counts and such. If I click into Exchange Online Plan 1 The url in my browser changes to:

https://admin.microsoft/Adminportal/Home?source=applauncher#/subscriptions/assets/1f623e61-6645-4d63-d853-XXYZ?skipReload=true

Note the ID after assets.

Now, If i use the Graph API and list all subscriptions, I do see the Exchange online Plan 1, but the subscription ID is different.

$url ="https://graph.microsoft/v1.0/directory/subscriptions";

stdClass Object
(
[@odata.context] => https://graph.microsoft/v1.0/$metadata#directory/subscriptions
[value] => Array
    (
        [0] => stdClass Object
            (
                [createdDateTime] => 2023-04-27T15:27:35Z
                [commerceSubscriptionId] => 1234567-de25-4aff-858c-AABBCCDD
                [id] => 123456-2a6d-4630-9931-SomethingNotCloseToOtherId
                [isTrial] => 
                [nextLifecycleDateTime] => 2025-04-03T00:00:00Z
                [skuId] => c5928f49-12ba-48f7-ada3-0d743a3601d5
                [skuPartNumber] => SomeExchangeSKu
                [status] => Enabled
                [totalLicenses] => 5
                [ownerTenantId] => 
                [ownerId] => 
                [ownerType] => 
                [serviceStatus] => Array

I would expect the id parameter do be the same as the id I saw in the url. Am I calling the wrong endpoint? What am I missing?

Share Improve this question edited Feb 28 at 9:56 Rukmini 16.1k2 gold badges8 silver badges20 bronze badges Recognized by Microsoft Azure Collective asked Feb 13 at 13:54 bart2puckbart2puck 2,5223 gold badges32 silver badges60 bronze badges 12
  • Can you attach the screenshot of the subscriptions in the tenant? – Rukmini Commented Feb 13 at 14:14
  • in admin.microsoft? just edited question. – bart2puck Commented Feb 13 at 14:21
  • So you want to list the licenses? – Rukmini Commented Feb 13 at 14:38
  • in the end. I have a 3rd party app that gives me a subscription id. The ID i get from them is the same as the ID in the url. I query the Graph api and get a different ID, so i can never match subscriptions. I believe in our setup, each subscription only has 1 service in it, so essentially its its own subscription. – bart2puck Commented Feb 13 at 14:41
  • When I tried I got the same IDs – Rukmini Commented Feb 14 at 5:18
 |  Show 7 more comments

1 Answer 1

Reset to default 0

The ID in the below URL when clicked on the license is commerceSubscriptionId.

  • The id of the subscription entity in the https://commerceapi.office/v1 API refers to a unique identifier for a specific subscription in the Microsoft 365 commerce system.

I executed the below query:

https://graph.microsoft/v1.0/directory/subscriptions

The ID in the URL will be displayed under commerceSubscriptionId in the response.

And you can also get the details of commerce Subscription Id by using the below query:

https://graph.microsoft/v1.0/directory/subscriptions/IDFromURL/commerceSubscriptionId

  • If Customer A and Customer B are on different subscriptions for Exchange Online Plan 1, their skuIds could be different (ending in 123 vs 234). This difference reflects the specific subscription or SKU instance for each customer.

本文标签: