Skip to main content

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:

  1. Verifies that the caller (your distributor account) owns the end customer, its current reseller, and the new reseller in the customer hierarchy.

  2. Reads the end customer's active Azure identifier mappings to determine the current reseller.

  3. 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.

  4. 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​

FieldTypeRequiredDescription
newParentCustomerIdstringYesThe DoiT customer ID of the reseller to assign the end customer to.
effectiveFromstringNoThe month the assignment takes effect, in YYYY-MM format. See Effective month rules.

Example:

{
"newParentCustomerId": "reseller-b",
"effectiveFrom": "2027-03"
}

Effective month rules​

  • When effectiveFrom is 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",
"actor": "[email protected]",
"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​

StatusCodeDescription
400same_resellerThe end customer is already assigned to the specified reseller and this is not a replay of a previous assignment.
400backdated_effective_fromeffectiveFrom is earlier than the current UTC month.
400effective_from_too_fareffectiveFrom is more than 12 months after the current month.
400invalid_effective_fromeffectiveFrom is not in YYYY-MM format.
400invalid_request_bodyThe request body is not valid JSON.
400validation_failedA required field is missing or a customer ID is invalid.
403forbiddenThe caller does not own the end customer, the current reseller, or the new reseller.
404customer_not_foundThe end customer, the current reseller, or the new reseller has no entry in the customer hierarchy.
409not_a_reseller_of_distributorThe new parent is not a reseller in the caller's distributor hierarchy.
409no_azure_mappingThe end customer has no active Azure identifier mapping.
409mixed_current_resellerThe end customer's active Azure identifiers are assigned to different resellers.
409too_many_mappingsThe end customer has more than 200 Azure identifier mappings.
409effective_month_not_after_latesteffectiveFrom is not later than the last closed reseller assignment.
409concurrent_changeThe end customer's mappings changed while the assignment was being recorded. This error is retryable.
500internal_server_errorAn unexpected error occurred on the server.
503authorization_unavailableThe Azure Tenant Mapper permission could not be checked because the permission lookup failed or is unavailable.