将已验证的域添加到现有客户的已批准域列表中

适用于:合作伙伴中心 | 由世纪互联运营的合作伙伴中心 | Microsoft Cloud for US Government 合作伙伴中心

如何将已验证的域添加到现有客户的已批准域列表中。

先决条件

  • 必须是域注册机构的合作伙伴。

  • 合作伙伴中心身份验证中所述的凭据。 此方案支持使用独立应用和 App+User 凭据进行身份验证。

  • 客户 ID (customer-tenant-id)。 如果不知道客户的 ID,可以通过选择“客户”工作区,然后从客户列表中选择客户,然后选择“帐户”,在合作伙伴中心查找该 ID。 在客户的“帐户”页上,在“客户帐户信息”部分查找 Microsoft ID Microsoft ID 与客户 ID (customer-tenant-id) 相同。

添加已验证的域

如果你是域注册机构的合作伙伴,则可以使用 verifieddomain API 将新的 资源发布到现有客户的域列表。 为此,请使用其 CustomerTenantId 标识客户。 指定 VerifiedDomainName 属性的值。 在请求中传递包含所需名称、功能、AuthenticationType、Status 和 VerificationMethod 属性的域资源。 若要指定新是联合域,请将域资源中的 AuthenticationType 属性设置为Federated,并在请求中包含 DomainFederation设置 资源。 如果方法成功,响应将包含 新验证域的域 资源。

自定义已验证域

添加自定义验证域时,onmicrosoft.com 上未注册的域,必须将 CustomerUser.immutableId 属性设置为要为其添加域的客户的唯一 ID 值。 在验证域时,在验证过程中需要此唯一标识符。 有关客户用户帐户的详细信息,请参阅 为客户创建用户帐户。

REST 请求

请求语法

方法 请求 URI
POST {baseURL}/v1/customers/{CustomerTenantId}/verifieddomain HTTP/1.1

URI 参数

使用以下查询参数指定要为其添加已验证域的客户。

名称 Type 需要 说明
CustomerTenantId guid Y 该值是 GUID 格式的 CustomerTenantId ,可用于指定客户。

请求标头

有关详细信息,请参阅合作伙伴中心 REST 标头

请求正文

下表描述了请求正文中的必需属性。

名称 Type 需要 说明
VerifiedDomainName string 已验证的域名。
object 包含域信息。
DomainFederation设置 object 是(如果 AuthenticationType = Federated 域是 Federated 域而不是 Managed 域时要使用的域联合设置。

Domain

下表描述了请求正文中必需的和可选的 属性。

名称 Type 需要 说明
AuthenticationType string 定义域是域Federated还是Managed域。 支持的值:ManagedFederated
功能 string 指定域功能。 例如 Email
IsDefault 可为 null 的布尔值 指示域是否为租户的默认域。 支持的值:True、、FalseNull
IsInitial 可为 null 的布尔值 指示域是否为初始域。 支持的值:True、、FalseNull
名称 字符串 域名。
RootDomain string 根域的名称。
状态 string 域状态。 例如 Verified。 支持的值:Unverified、、VerifiedPendingDeletion
VerificationMethod string 域验证方法类型。 支持的值:None、、DnsRecordEmail

域联合设置

下表描述了请求正文中必需的和可选的 DomainFederation设置 属性。

名称 Type 需要 说明
ActiveLogOnUri string 富客户端使用的登录 URI。 此属性是合作伙伴的 STS 身份验证 URL。
DefaultInteractiveAuthenticationMethod string 指示应用程序要求用户具有交互式登录时应使用的默认身份验证方法。
FederationBrandName string 联合品牌名称。
IssuerUri string 证书颁发者的名称。
LogOffUri string 注销 URI。 此属性描述联合域注销 URI。
MetadataExchangeUri string 指定用于从富客户端应用程序进行身份验证的元数据交换终结点的 URL。
NextSigningCertificate string ADFS V2 STS 用于对声明进行签名的将来使用的证书。 此属性是证书的 base64 编码表示形式。
OpenId连接DiscoveryEndpoint string 联合 IDP STS 的 OpenID 连接发现终结点。
PassiveLogOnUri string 旧被动客户端使用的登录 URI。 此属性是发送联合登录请求的地址。
PreferredAuthenticationProtocol string 身份验证令牌的格式。 例如 WsFed。 支持的值:WsFedSamlp
PromptLoginBehavior string 提示登录行为类型。 例如 TranslateToFreshPasswordAuth。 支持的值:TranslateToFreshPasswordAuth、、 NativeSupportDisabled
SigningCertificate string ADFS V2 STS 当前用于对声明进行签名的证书。 此属性是证书的 base64 编码表示形式。
SigningCertificateUpdateStatus string 指示签名证书的更新状态。
SigningCertificateUpdateStatus 可为 null 的布尔值 指示 IDP STS 是否支持 MFA。 支持的值:True、、FalseNull

请求示例

POST https://api.partnercenter.microsoft.com/v1/customers/{CustomerTenantId}/verifieddomain HTTP/1.1
Authorization: Bearer <token>
Accept: application/json, text/plain, */*
MS-RequestId: 312b044d-dc41-4b37-c2d5-7d27322d9654
MS-CorrelationId: 7cb67bb7-4750-403d-cc2e-6bc44c52d52c
Content-Type: application/json;charset=utf-8
X-Locale: "en-US"

{
    "VerifiedDomainName": "Example.com",
    "Domain": {
        "AuthenticationType": "Federated",
        "Capability": "Email",
        "IsDefault": Null,
        "IsInitial": Null,
        "Name": "Example.com",
        "RootDomain": null,
        "Status": "Verified",
        "VerificationMethod": "None"
    },
    "DomainFederationSettings": {
        "ActiveLogOnUri": "https://sts.microsoftonline.com/FederationPassive/",
        "DefaultInteractiveAuthenticationMethod": "http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password",
        "FederationBrandName": "FederationBrandName",
        "IssuerUri": "Example.com",
        "LogOffUri": "https://sts.microsoftonline.com/FederationPassive/",
        "MetadataExchangeUri": null,
        "NextSigningCertificate": null,
        "OpenIdConnectDiscoveryEndpoint": "https://sts.contoso.com/adfs/.well-known/openid-configuration",
        "PassiveLogOnUri": "https://sts.microsoftonline.com/Trust/2005/UsernameMixed",
        "PreferredAuthenticationProtocol": "WsFed",
        "PromptLoginBehavior": "TranslateToFreshPasswordAuth",
        "SigningCertificate": <Certificate Signature goes here>,
        "SigningCertificateUpdateStatus": null,
        "SupportsMfa": true
    }
}

REST 响应

如果成功,此 API 将 返回新验证域的域 资源。

响应的成功和错误代码

每个响应都带有一个 HTTP 状态代码,用于指示成功或失败以及其他调试信息。 请使用网络跟踪工具来读取此代码、错误类型和其他参数。 如需完整列表,请参阅合作伙伴中心 REST 错误代码

响应示例

HTTP/1.1 201 Created
Content-Length: 206
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 7cb67bb7-4750-403d-cc2e-6bc44c52d52c
MS-RequestId: 312b044d-dc41-4b37-c2d5-7d27322d9654
Date: Tue, 14 Feb 2017 20:06:02 GMT

{
    "authenticationType": "federated",
    "capability": "email",
    "isDefault": false,
    "isInitial": false,
    "name": "Example.com",
    "status": "verified",
    "verificationMethod": "dns_record"
}