고객의 자격을 비동기적으로 가져오기
고객의 자격을 비동기적으로 가져오는 방법.
필수 조건
자격 증명(파트너 센터 인증에서 설명). 이 시나리오는 독립 실행형 앱 및 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 |
---|---|
GET | {baseURL}/v1/customers/{customer-tenant-id}/qualifications HTTP/1.1 |
URI 매개 변수
이 표에는 모든 자격을 가져오는 데 필요한 쿼리 매개 변수가 나열되어 있습니다.
이름 | 종류 | 필요함 | 설명 |
---|---|---|---|
customer-tenant-id | string | 예 | 고객을 식별하는 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: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
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: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
MS-RequestId: 037db222-6d8e-4d7f-ba78-df3dca33fb68
[
{
"qualification": "Education",
"vettingStatus": "Approved",
}
]
검토 중
HTTP/1.1 200 OK
Content-Length:
Content-Type: application/json
MS-CorrelationId: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
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: 7d2456fd-2d79-46d0-9f8e-5d7ecd5f8745
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"
}
]
관련 문서
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기