Reseller assignment
A distributor can move an Azure end customer between its resellers. The move takes effect from a month you choose and applies to all of the end customer's Azure identifier mappings in a single transaction.
Required permissions
-
You must be a distributor in the customer hierarchy, and must own the end customer and both resellers (current and new).
-
Your DoiT account must have the Azure Tenant Mapper permission.
How it works
When you submit a reseller assignment, the platform:
-
Verifies that the caller (your distributor account) owns the end customer, its current reseller, and the new reseller in the customer hierarchy.
-
Reads the end customer's active Azure identifier mappings to determine the current reseller.
-
Closes the current reseller's history entry at the effective month and records the new reseller from that month onward, across every active mapping in one transaction.
-
Publishes an audit event that records the caller, the end customer, the previous and new reseller, and the effective month.
Move between resellers
Reseller assignment is effective-dated. A move from one reseller to another takes effect from a specific month.
From the effective month:
-
Distributor: The distributor for both resellers continues to see the customer.
-
New reseller: The customer appears in the customer list.
-
The new reseller can create mappings for the customer's Azure customer IDs.
-
The new reseller cannot delete mappings that already exist for a moved customer. Deletion still requires the original hierarchy relationship.
-
From the effective month onward, the end customer's Azure spend appears under the new reseller.
-
-
Previous reseller: The customer no longer appears in the customer list.
-
The previous reseller can still manage existing mappings through its place in the partner hierarchy.
-
Billing data for months before the effective month stays attributed to the previous reseller.
-
Azure customer IDs that belong to the same end customer move together. If those IDs do not resolve to one reseller, they stay on the partner hierarchy placement.
Limitations
-
A recorded assignment cannot be cancelled. To reverse a move, submit a new assignment back to the original reseller.
-
Only one assignment can be in effect for a given future month. If a move is already scheduled, a new assignment must target a later month or wait until the scheduled month passes.
-
The end customer must have at least one active Azure identifier mapping. End customers with no active mappings cannot be reassigned.
-
The maximum number of Azure identifier mappings per end customer is 200.
Assign an end customer to a new reseller
Send a POST request to the reseller assignment endpoint:
POST /api/v1/azure/tenants/customers/{endCustomerId}/reseller-assignments
Request body
| Field | Type | Required | Description |
|---|---|---|---|
newParentCustomerId | string | Yes | The DoiT customer ID of the reseller to assign the end customer to. |
effectiveFrom | string | No | The month the assignment takes effect, in YYYY-MM format. See Effective month rules. |
Example:
{
"newParentCustomerId": "reseller-b",
"effectiveFrom": "2027-03"
}
Effective month rules
-
When
effectiveFromis omitted, the assignment defaults to the first day of the next UTC month. -
The latest allowed month is 12 months after the current month.
-
The month must be later than the last closed reseller assignment for the end customer.
Response
A successful request returns 200 OK with the recorded assignment:
{
"endCustomerId": "end-customer-1",
"previousParentCustomerId": "reseller-a",
"newParentCustomerId": "reseller-b",
"effectiveFrom": "2027-03-01",
"recordedAt": "2026-12-14T09:30:00Z",
"mappingsUpdated": 2,
"alreadyApplied": false
}
The alreadyApplied field is true when an identical previous request already recorded this assignment. The response returns the original assignment details, with mappingsUpdated set to 0 because no mappings are written, and no duplicate audit event is published.
Error codes
| Status | Code | Description |
|---|---|---|
| 400 | same_reseller | The end customer is already assigned to the specified reseller and this is not a replay of a previous assignment. |
| 400 | backdated_effective_from | effectiveFrom is earlier than the current UTC month. |
| 400 | effective_from_too_far | effectiveFrom is more than 12 months after the current month. |
| 400 | invalid_effective_from | effectiveFrom is not in YYYY-MM format. |
| 400 | invalid_request_body | The request body is not valid JSON. |
| 400 | validation_failed | A required field is missing or a customer ID is invalid. |
| 403 | forbidden | The caller does not own the end customer, the current reseller, or the new reseller. |
| 404 | customer_not_found | The end customer, the current reseller, or the new reseller has no entry in the customer hierarchy. |
| 409 | not_a_reseller_of_distributor | The new parent is not a reseller in the caller's distributor hierarchy. |
| 409 | no_azure_mapping | The end customer has no active Azure identifier mapping. |
| 409 | mixed_current_reseller | The end customer's active Azure identifiers are assigned to different resellers. |
| 409 | too_many_mappings | The end customer has more than 200 Azure identifier mappings. |
| 409 | effective_month_not_after_latest | effectiveFrom is not later than the last closed reseller assignment. |
| 409 | concurrent_change | The end customer's mappings changed while the assignment was being recorded. This error is retryable. |
| 500 | internal_server_error | An unexpected error occurred on the server. |
| 503 | authorization_unavailable | The Azure Tenant Mapper permission could not be checked because the permission lookup failed or is unavailable. |