다음을 통해 공유


고객의 자격을 비동기적으로 가져오기

고객의 자격을 비동기적으로 가져오는 방법.

필수 구성 요소

  • 파트너 센터 인증에 설명된 대로 자격 증명. 이 시나리오는 독립 실행형 앱 및 App+사용자 자격 증명을 모두 사용하여 인증을 지원합니다.

  • 고객 ID(customer-tenant-id)입니다. 고객의 ID를 모르는 경우 파트너 센터에서 고객 작업 공간을 선택한 다음 고객 목록에서 고객을 선택한 후, 그런 다음 계정을 조회할 수 있습니다. 고객 계정 페이지의 고객 계정 정보 섹션에서 Microsoft ID을 찾습니다. Microsoft ID는 고객 ID(customer-tenant-id)와 동일합니다.

C#

고객의 자격을 얻으려면 고객 식별자를 사용하여 IAggregatePartner.Customers.ById 메서드를 호출합니다. 그런 다음 Qualification 속성을 사용하여 ICustomerQualification 인터페이스를 검색합니다. 마지막으로 GetQualifications() 또는 GetQualificationsAsync() 호출하여 고객의 자격을 검색합니다.

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

샘플: 콘솔 샘플 앱. 프로젝트: SdkSamples 클래스: GetCustomerQualifications.cs

REST 요청

요청 구문

메서드 요청 URI
가져오기 {baseURL}/v1/customers/{customer-tenant-id}/qualifications HTTP/1.1

URI 매개 변수

이 표에는 모든 자격을 가져오는 데 필요한 쿼리 매개 변수가 나열되어 있습니다.

이름 유형 필수 묘사
고객-테넌트 ID 문자열 고객을 식별하는 GUID 형식 문자열입니다.

요청 헤더

자세한 내용은 파트너 센터 REST 헤더 참조하세요.

요청 본문

없음.

요청 예제

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 응답

성공하면 이 메서드는 응답 본문에서 자격 조건의 컬렉션을 반환합니다. 다음은 Education 자격이 있는 고객에게 GET 호출의 예입니다.

응답 성공 및 오류 코드

각 응답에는 성공 또는 실패 및 추가 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 추가 매개 변수를 읽습니다. 전체 목록은 파트너 센터 REST 오류 코드를 참조하세요.

응답 예제

승인

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",
    }
]

검토 중

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
    }
]

거부

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
    }
]

국가 소유 기관 샘플

주 소유 기관의 POST 샘플


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

//

국영 기업은 자격 취득 샘플을 통해


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

주 소유 법인에서 교육을 통해 자격 획득


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

GCC를 통한 자격 취득으로 국영 기업


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