Kopīgot, izmantojot


Get a customer's custom domain

Applies to: Partner Center

Gets a CustomDomain resource.

When a new customer account is created in Partner Center, it's assigned a unique domain. This domain can be used to identify a customer, and it can also be used for other purposes, such as mailbox set-up.

Prerequisites

  • Credentials as described in Partner Center authentication. This scenario supports app+user credentials or app-only authentication.

  • A customer ID (customer-tenant-id). If you don't know the customer's ID, you can look it up in Partner Center. Select the Customers workspace from the Partner Center Home page. Select the customer from the Customer list, then select Account. On the customer's Account page, look for the Microsoft ID in the Customer Account details section. The Microsoft ID is the same as the customer ID (customer-tenant-id).

Important

GDAP Roles are required to call this API. DAP isn't supported. Partner Authentication is still required (AdminAgent/HelpDeskAgent/SalesAgent)

GDAP roles

You need at least one of the following GDAP roles:

  • Directory Writer
  • Global Reader
  • Domain Administrator

REST request

Request syntax

Method Request URI
GET {baseURL}/v1/customers/{customer-tenant-id}/customDomains HTTP/1.1

URI parameter

Use the following query parameter to a specific customer.

Name Type Required Description
customer-tenant-id guid Y The value is a GUID formatted customer-tenant-id that allows the reseller to filter the results for a given customer that belongs to the reseller.

Request headers

For more information, see Partner Center REST headers.

Request body

None.

Request example

GET https://api.partnercenter.microsoft.com/v1/customers/{customer-tenant-id}/customDomains HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 74ca1db9-df92-41c6-a362-a16433b0542b

REST response

If successful, this method returns a custom domain resource in the response body.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and other debugging information. Use a network trace tool to read this code, error type, and other parameters. For the full list, see Error Codes.

Response example

HTTP/1.1 200 OK
Content-Length: 1530
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 74ca1db9-df92-41c6-a362-a16433b0542b

["contosco.onmicrosoft.com"]