इसके माध्यम से साझा किया गया


Get a customer's qualification asynchronously

How to get a customer's qualifications asynchronously.

Prerequisites

  • Credentials as described in Partner Center authentication. This scenario supports authentication with both standalone App and App+User credentials.

  • 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 get a customer's qualifications, call the IAggregatePartner.Customers.ById method with the customer identifier. Then use the Qualification property to retrieve a ICustomerQualification interface. Finally, call GetQualifications() or GetQualificationsAsync() to retrieve the customer's qualifications.

// IAggregatePartner partnerOperations;
// string customerId;
var customerQualifications = partnerOperations.Customers.ById(customerId).Qualification.GetQualifications();

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

REST request

Request syntax

Method Request URI
GET {baseURL}/v1/customers/{customer-tenant-id}/qualifications HTTP/1.1

URI parameter

This table lists the required query parameter to get all the qualification.

Name Type Required Description
customer-tenant-id string Yes A GUID-formatted string that identifies the customer.

Request headers

For more information, see Partner Center REST headers.

Request body

None.

Request example

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

REST response

If successful, this method returns a collection of qualifications in the response body. Below are examples of the GET call on a customer with the Education qualification.

Response success and error codes

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

Response examples

Approved

HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
    {
        "qualification": "Education",
        "vettingStatus": "Approved",
    }
]

In Review

HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
    {
        "qualification": "Education",
        "vettingStatus": "InReview",
        "vettingCreatedDate": "2020-12-03T10:37:38.885Z" // UTC
    }
]

Denied

HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
    {
        "qualification": "Education",
        "vettingStatus": "Denied",
        "vettingReason": "Not an Education Customer", // example Vetting Reason
        "vettingCreatedDate": "2020-12-03T10:37:38.885Z" // UTC
    }
]

State Owned Entity Samples

State Owned Entity via POST sample


//SOE
POST {customer_id}/qualifications
{
"qualification": "StateOwnedEntity"
}

//

State Owned Entity via Get Qualifications sample


//SOE:
GET {customer_id}/qualifications
[
    {
        "qualification": "StateOwnedEntity"
    }
]

State Owned Entity via Get Qualifications with Education


GET {customer_id}/qualifications
[
    {
        "qualification": "Education",
        "vettingStatus": "Approved"
    },
{
        "qualification": "StateOwnedEntity"
    }
]

State Owned Entity via Get Qualifications with GCC


GET {customer_id}/qualifications
[
    {
        "qualification": "GovernmentCommunityCloud",
        "vettingStatus": "Approved",
        "vettingCreateDate": "2021-05-06T19:59:56.6832021+00:00"
    },
{
        "qualification": "StateOwnedEntity"
    }
]