Azure’s SaaS fulfillment operations API only ever returns pending operations that still require your explicit acknowledgment. If you’re always seeing an empty array, it usually comes down to two factors:
subscriptionId
you pass into the List Operations call must be the SaaS subscription ID returned by the Resolve API – not the raw marketplace GUID out of your webhook payload. You need to exchange your marketplace purchase token for the true subscription identifier by POSTing to:POST https://marketplaceapi.microsoft.com/api/saas/subscriptions/resolve?api-version=2018-08-31
Content-Type: application/json
{
"purchaseToken": "<token from webhook header>"
}
That response includes the subscriptionId
you must use for all fulfillment calls.
{"operations":[]}
.If you need to validate a specific change, it’s more reliable to use the operationId
from your webhook payload and call the single‐operation endpoint:
GET https://marketplaceapi.microsoft.com/api/saas/subscriptions/{resolvedSubscriptionId}/operations/{operationId}?api-version=2018-08-31
Authorization: Bearer <access_token>
That call always returns the details and status (InProgress
, Succeeded
, Failed
, Conflict
, etc.) for that operation, even if it’s no longer in the pending list (Microsoft Learn).
Logs:
2025-05-15T09:12:48.120Z DEBUG [Fulfillment] Calling ResolveSubscription
POST https://marketplaceapi.microsoft.com/api/saas/subscriptions/resolve?api-version=2018-08-31
Authorization: Bearer eyJ0eXAiOiJKV1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQiOiJKV1QiOiJKV1QiOiJKV1QiOiJKV1Qi
Body: { "purchaseToken": "eyJhbGciOiJSUzI1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxCJ9…" }
→ 200 OK in 145 ms
Response:
{
"subscriptionId": "a1b2c3d4-xxxx-xxxx-xxxx-1234567890ef",
"resourceLocation": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/rg-saas/providers/Microsoft.SaaS/saasServices/contoso-saas"
}
2025-05-15T09:12:48.300Z DEBUG [Fulfillment] Listing pending operations
GET https://marketplaceapi.microsoft.com/api/saas/subscriptions/a1b2c3d4-e5f6-7890-abcd-1234567890ef/operations?api-version=2018-08-31
Authorization: Bearer eyJ0eXAiOiJKV1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQiOiJKV1QiOiJKV1QiOiJKV1QiOiJKV1Qi
→ 204 No Content (empty operations) in 92 ms
Response: { "operations": [] }
2025-05-15T09:12:48.395Z INFO [Fulfillment] No pending operations found for subscription a1b2c3d4-e5f6-7890-abcd-1234567890ef
2025-05-15T09:12:48.400Z DEBUG [Fulfillment] Querying specific operation by ID
GET https://marketplaceapi.microsoft.com/api/saas/subscriptions/a1b2c3d4-xxxx-xxxx-xxxx-1234567890ef/operations/3f4e5d6c-xxxx-xxxx-xxxx-34567890abcd?api-version=2018-08-31
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJh...
→ 200 OK in 110 ms
Response:
{
"operationId": "3f4e5d6c-xxxx-xxxx-xxxx-34567890abcd",
"type": "ChangeQuantity",
"status": "InProgress",
"startTime": "2025-05-15T09:12:48.350Z",
"subscriber": {
"tenantId": "f5a8f1c2-xxxx-xxxx-xxxx-df3c9a123456",
"objectId": "e3f0b2d4-xxxx-xxxx-xxxx-1a2b3c4d5e6f"
},
"planId": "contoso:saas-sample/standard",
"requestedQuantity": 10,
"currentQuantity": 5
}
2025-05-15T09:12:48.500Z INFO [Fulfillment] Processing ChangeQuantity operation
OperationId: 3f4e5d6c-xxxx-xxxx-xxxx-34567890abcd
From 5 → 10 licenses
2025-05-15T09:12:48.800Z DEBUG [Fulfillment] Acknowledging operation success
PATCH https://marketplaceapi.microsoft.com/api/saas/subscriptions/a1b2c3d4-xxxx-xxxx-xxxx-1234567890ef/operations/3f4e5d6c-xxxx-xxxx-xxxx-34567890abcd?api-version=2018-08-31
Body: { "status": "Success" }
→ 200 OK in 82 ms
2025-05-15T09:12:48.900Z INFO [Fulfillment] ChangeQuantity acknowledged successfully