Get the status of a customer's direct signing (direct acceptance) of Microsoft Customer Agreement
Applies to: Partner Center
Does not apply to: Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government
The DirectSignedCustomerAgreementStatus resource is currently supported by Partner Center only in the Microsoft public cloud.
This article explains how you can retrieve the status of a customer's direct acceptance of the Microsoft Customer Agreement.
Prerequisites
Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
A customer ID (
customer-tenant-id
). If you don't know the customer's ID, you can look it up in Partner Center by selecting the Customers workspace, then the customer from the customer list, then Account. On the customer's Account page, look for the Microsoft ID in the Customer Account Info section. The Microsoft ID is the same as the customer ID (customer-tenant-id
).
C#
To retrieve the status of a customer's direct acceptance of the Microsoft Customer Agreement, call the IAggregatePartner.Customers.ById method with the customer identifier. Then use the Agreements property to retrieve a ICustomerAgreementCollection interface. Finally, call GetDirectSignedCustomerAgreementStatus()
or GetDirectSignedCustomerAgreementStatusAsync()
to retrieve the status.
// IAggregatePartner partnerOperations;
// string customerId;
var customerDirectSigningStatus = partnerOperations.Customers.ById(selectedCustomerId).Agreements.GetDirectSignedCustomerAgreementStatus();
Sample: Console Sample App. Project: SdkSamples Class: GetDirectSignedCustomerAgreementStatus.cs
REST request
To retrieve the status of a customer's direct acceptance of the Microsoft Customer Agreement, create a REST request to retrieve the DirectSignedCustomerAgreementStatus for the customer.
Request syntax
Use the following request syntax:
Method | Request URI |
---|---|
GET | {baseURL}/v1/customers/{customer-tenant-id}/directSignedMicrosoftCustomerAgreementStatus HTTP/1.1 |
URI parameters
You can use the following URI parameters with your request:
Name | Type | Required | Description |
---|---|---|---|
customer-tenant-id | GUID | Yes | The value is a GUID-formatted CustomerTenantId that allows you to specify the tenant ID of a customer. |
Request headers
For more information, see Partner Center REST headers.
Request body
None.
Request example
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 response
If successful, this method returns a DirectSignedCustomerAgreementStatus resource in the response body.
The resource has an isSigned property that indicates the customer's direct signing (direct acceptance) status.
A value of true indicates that the agreement was signed (accepted) directly by the customer.
A value of false indicates that the agreement hasn't been signed (accepted) directly by the customer.
Response success and error codes
Each response comes with an HTTP status code that indicates success or failure and more debugging information.
Use a network trace tool to read this code, error type, and other parameters. For the full list, see Partner Center REST error codes.
Response example
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}