获取客户直接签署(直接接受)Microsoft 客户协议的状态
适用于:合作伙伴中心
不适用于:由世纪互联运营的合作伙伴中心 |美国政府Microsoft云合作伙伴中心
DirectSignedCustomerAgreementStatus 资源目前仅在 Microsoft 公有云中受合作伙伴中心支持。
本文介绍如何检索客户直接接受Microsoft客户协议的状态。
先决条件
合作伙伴中心身份验证中所述的凭据。 此方案仅支持使用 App+User 凭据进行身份验证。
客户 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: aaaa0000-bb11-2222-33cc-444444dddddd
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: aaaa0000-bb11-2222-33cc-444444dddddd
{"isSigned":true}