Update a customer's qualifications asynchronously

Updates a customer's qualifications asynchronously.

A partner can update a customer's qualifications asynchronously to be "Education", "GovernmentCommunityCloud" or "StateOwnedEntity". Other values such as "None" and "Nonprofit" can't be set.

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).

  • For Government Community Cloud (GCC) qualifications only: you'll need at least one of the following granular delegated admin privileges (GDAP) roles. To learn more about GDAP, explore our MS Learn articles, beginning with Introduction to GDAP.

    • Directory Reader
    • Directory Writer
    • License Administrator
    • User Administrator

C#

To create a customer's qualification for "Education," first, create a CustomerQualificationRequest type object and specify the Education qualification type and the EducationSegment, along with a Website (optional).

Then, call the IAggregatePartner.Customers.ById method with the customer identifier.

Then use the Qualification property to retrieve a ICustomerQualification interface.

Finally, call CreateQualifications() or CreateQualificationsAsync() with the CustomerQualificationRequest type object as the input parameter.

// Education
var eduRequestBody = new CustomerQualificationRequest 
{
    Qualification = "Education",
    EducationSegment = "K12", // could also be "HigherEducation"
    Website = "example.edu"
};

var eduCustomerQualification = partnerOperations.Customers.ById(existingCustomer.Id).Qualification.CreateQualifications(eduRequestBody);

// State Owned Entity
var soeRequestBody = new CustomerQualificationRequest 
{
    Qualification = "StateOwnedEntity"
};

var soeCustomerQualification = partnerOperations.Customers.ById(existingCustomer.Id).Qualification.CreateQualifications(soeRequestBody);

Sample: Console Sample App. Project: SdkSamples Class: CreateCustomerQualification.cs

To update a customer's qualification to GovernmentCommunityCloud on an existing customer without a qualification, the partner is also required to include the customer's validation code.

First, create a CustomerQualificationRequest type object and specify the GovernmentCommunityCloud qualification type and the validation code.

Then, call the IAggregatePartner.Customers.ById method with the customer identifier.

Then use the Qualification property to retrieve a ICustomerQualification interface.

Finally, call CreateQualifications() or CreateQualificationsAsync() with the CustomerQualificationRequest type object as the input parameter.

var gccRequestBody = new CustomerQualificationRequest 
{
    Qualification = "GovernmentCommunityCloud",
    ValidationCode = "<validation code>"
};

var gccCustomerQualification = partnerOperations.Customers.ById(existingCustomer.Id).Qualification.CreateQualifications(gccRequestBody);

Sample: Console Sample App. Project: SdkSamples Class: CreateCustomerQualificationWithGCC.cs

REST request

Request syntax

Method Request URI
POST {baseURL}/v1/customers/{customer_tenant_id}/qualifications HTTP/1.1

URI parameter

Use the following query parameter to update the qualification.

Name Type Required Description
customer-tenant-id GUID Yes The value is a GUID formatted customer-tenant-id that allows the reseller to filter the results for a given customer that belongs to the reseller.

Request headers

For more information, see Partner Center REST headers.

Request body

This table describes the qualification object in the request body.

Property Type Required Description
Qualification string Yes The string value from the CustomerQualification enum.

This table describes request body for the Education Qualification specifically.

Property Type Required Description
Qualification string Yes Education
EducationSegment string Yes K12, HigherEducation
Website string No Website for the education entity

If the qualification is for Education then Education segment is a required field.

  • Allowed values for EducationSegment are K12 and HigherEducation
  • Website remains an optional field, and is relevant only if the Qualification is for Education. However, including it if available/applicable is highly recommended

This table describes request body for the GovernmentCommunityCloud Qualification specifically.

Property Type Required Description
Qualification string Yes GovernmentCommunityCloud
ValidationCode string Yes Partner's GCC validation code. Example - 123456

If the qualification is for GovernmentCommunityCloud then ValidationCode is a required field.

Request example

POST https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/qualifications HTTP/1.1
Accept: application/json
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68

// SOE
{
    "qualification": "StateOwnedEntity"
}

// Education
{
    "qualification": "Education",
    "educationSegment": "HigherEducation", // could also be "K12"
    "website": "contoso.edu"
}

// GCC
{
    "qualification": "GovernmentCommunityCloud",
    "validationCode": "123456"
}

REST response

If successful, this method returns a qualifications object in the response body. Following is an example of the POST call on a customer (with a previous qualification of None) with the Education qualification.

Response success and error codes

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

Response example

HTTP/1.1 201 CREATED
Content-Length: 29
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
{
    "qualification": "Education",
    "vettingStatus": "InReview",
    "vettingCreateDate": "2020-12-04T20:54:24Z" // UTC
}