Get a partner's validation codes

Applies to: Partner Center for Microsoft Cloud for US Government

This article describes how to get a collection of a partner's Government Community Cloud validation codes. A validation code is required to create a customer in the government community cloud.

If you're interested in having your organization or your customer's organization approved for Office 365 Government GCC for CSP, see Office 365 Government GCC for CSP Partner and Customer eligibility criteria.

Prerequisites

C#

To get a list of all of a partner's validation codes, call GetValidationCodes.

// create the partner operations
IAggregatePartner partnerOperations = PartnerService.Instance.CreatePartnerOperations(credentials);

var gccValidations = partnerOperations.Validations.GetValidationCodes();

REST request

Request syntax

Method Request URI
GET {baseURL}/v1/customers/all/validations HTTP/1.1

Request headers

For more information, see Partner Center REST headers.

Request body

None.

Request example

GET https://api.partnercenter.microsoft.com/v1/customers/all/validations HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 7266f5f6-30ca-4672-9eb6-6c9d6dd0e9d3

REST response

If successful, this method returns a list of ValidationCode resources in the response body.

Response success and error codes

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

Response example

HTTP/1.1 200 OK
Content-Length: 434
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 7266f5f6-30ca-4672-9eb6-6c9d6dd0e9d3

[
  {
    "partnerId": "9daaeb1c-4195-4db5-9f1d-509eb70c8c2d",
    "organizationName": "Contoso, Inc.",
    "validationId": "12345",
    "maxCreates": 5,
    "remainingCreates": 4,
    "eTag": "W/\"datetime'2018-10-10T18%3A49%3A58.727348Z'\""
  },
  {
    "partnerId": "9daaeb1c-4195-4db5-9f1d-509eb70c8c2d",
    "organizationName": "Contoso, Inc. Finance Department",
    "validationId": "987654",
    "maxCreates": 5,
    "remainingCreates": 5,
    "eTag": "W/\"datetime'2018-10-19T17%3A51%3A45.6584512Z'\""
  }
]