Microsoft Subscription Reconciliation
Quickly reconcile Pax8 and Microsoft subscription quantities. This guide details a workaround to map Pax8 company and product identifiers to their Microsoft Tenant and Graph API SKU counterparts, addressing the current lack of direct Microsoft subscription ID exposure in the Pax8 Subscription API.
References:
- Pax8 API: OpenAPI Spec
- Microsoft SKU Info: Product Names & Service Plan Identifiers (download CSV from this page)
- Graph API SKUs: Subscribed SKUs Doc
Prerequisites
- Pax8 API access.
- Microsoft Graph API access with necessary permissions (e.g.,
Organization.Read.All
). - Familiarity with REST APIs (Pax8 & Microsoft Graph).
- The Microsoft Product Reference CSV (downloadable from the "Microsoft SKU Info" link above).
Reconciliation Steps
Step 1: Map Pax8 Company to Microsoft Tenant ID
- Fetch Pax8 Company Details:
UseGET /v1/companies/{companyId}
(Pax8 API). - Identify Tenant ID:
TheexternalId
field in the response can be used to map to the Microsoft Tenant ID.
Step 2: Map Pax8 Product to Microsoft Graph API SKU
- Get Pax8 Product Name:
From the Pax8 Product API (GET /v1/products
or/v1/products/{productId}
), note the productname
(e.g., "Microsoft 365 Business Standard"). - Use Microsoft's Reference CSV:
- Download the CSV from the "Microsoft SKU Info" link.
- Find the Pax8 product
name
in the CSV'sProduct_Display_Name
column. - From that matching row, retrieve the
GUID
. ThisGUID
is theskuId
used by the Graph API.
Step 3: Reconcile Subscription Quantities
-
Get Pax8 Quantity:
Note the subscription quantity from Pax8 for the specific product and company. You can use the Pax8 subscriptions endpoint to pull subscription quantities. -
Query Microsoft Graph API:
CallGET https://graph.microsoft.com/v1.0/organization/{tenantId}/subscribedSkus
(replace{tenantId}
with the ID from Step 1). -
Compare Quantities:
- In the Graph API response, find the SKU where its
skuId
matches theGUID
obtained in Step 2. - Compare the
consumedUnits
value from this SKU with the quantity from Pax8.
Example Graph API
subscribedSku
field for quantity:{ // ... other fields "skuId": "05e9a617-0261-457d-9994-2f7e80c53611", // Matches GUID from CSV "consumedUnits": 3, // Compare this value // ... other fields }
- In the Graph API response, find the SKU where its
Key Considerations
- CSV Updates: Regularly download the latest Microsoft product reference CSV.
- Product Naming: Be mindful of potential minor differences in product names between Pax8 and the CSV.
- Workaround Status: This is an interim solution. Monitor Pax8 developer channels for API enhancements.
- Troubleshooting: Log your mapping process to help identify any discrepancies.
Updated 4 days ago