获取客户的直接签名(直接接受)Microsoft 客户协议的状态

适用于:合作伙伴中心

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

合作伙伴中心目前仅在 Microsoft 公有云中支持 DirectSignedCustomerAgreementStatus 资源。

本文介绍如何检索客户直接接受Microsoft 客户协议的状态。

先决条件

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

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

C#

若要检索客户直接接受Microsoft 客户协议的状态,请使用客户标识符调用 IAggregatePartner.Customers.ById 方法。 然后使用 Agreements 属性检索 ICustomerAgreementCollection 接口。 最后,调用 GetDirectSignedCustomerAgreementStatus()GetDirectSignedCustomerAgreementStatusAsync() 检索状态。

// IAggregatePartner partnerOperations;
// string customerId;
var customerDirectSigningStatus = partnerOperations.Customers.ById(selectedCustomerId).Agreements.GetDirectSignedCustomerAgreementStatus();

示例控制台示例应用项目:SdkSamples :GetDirectSignedCustomerAgreementStatus.cs

REST 请求

若要检索客户直接接受Microsoft 客户协议的状态,请创建 REST 请求以检索客户的 DirectSignedCustomerAgreementStatus

请求语法

使用以下请求语法:

方法 请求 URI
GET {baseURL}/v1/customers/{customer-tenant-id}/directSignedMicrosoftCustomerAgreementStatus HTTP/1.1

URI 参数

可以将以下 URI 参数用于请求:

名称 类型​​ 必需 说明
customer-tenant-id GUID 该值是 GUID 格式的 CustomerTenantId ,可用于指定客户的租户 ID。

请求标头

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

请求正文

无。

请求示例

GET https://api.partnercenter.microsoft.com/v1/customers/14876998-c0dc-46e6-9d0c-65a57a6c32ec/directSignedMicrosoftCustomerAgreementStatus HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 94e4e214-6b06-4fb7-96d1-94d559f9b47f
MS-CorrelationId: ab993325-1605-4cf4-bac4-fb584142a31b

REST 响应

如果成功,此方法在响应正文中返回 DirectSignedCustomerAgreementStatus 资源

资源具有 isSigned 属性,指示客户的直接签名(直接接受)状态。

  • true表示协议已由客户直接签署(已接受)。

  • false表示客户尚未直接签署协议(已接受)。

响应的成功和错误代码

每个响应都有一个 HTTP 状态代码,指示成功或失败以及更多的调试信息。

使用网络跟踪工具读取此代码、错误类型和其他参数。 如需完整列表,请参阅合作伙伴中心 REST 错误代码

响应示例

HTTP/1.1 200 OK
Content-Length: 20
Content-Type: application/json
MS-RequestId: 94e4e214-6b06-4fb7-96d1-94d559f9b47f
MS-CorrelationId: ab993325-1605-4cf4-bac4-fb584142a31b

{"isSigned":true}