사용 가능한 라이선스 목록 가져오기
이 문서에서는 지정된 고객의 사용자가 사용할 수 있는 라이선스 목록을 가져오는 방법을 설명합니다.
필수 조건
자격 증명(파트너 센터 인증에서 설명). 이 시나리오는 앱 + 사용자 자격 증명을 사용한 인증만 지원합니다.
고객 ID (
customer-tenant-id
). 고객의 ID를 모르는 경우 고객 작업 영역을 선택하고 고객 목록에서 고객을 선택한 다음 계정을 선택하여 파트너 센터에서 조회할 수 있습니다. 고객 계정 페이지의 고객 계정 정보 섹션에서 Microsoft ID를 찾습니다. Microsoft ID는 고객 ID(customer-tenant-id
)와 동일합니다.
GDAP 역할
다음 GDAP 역할 중 하나 이상이 필요합니다.
- 디렉터리 읽기 권한자
- 전역 판독기
- 사용자 관리자
- 라이선스 관리자
C#
기본 라이선스 그룹에서 고객의 사용자에게 사용할 수 있는 라이선스 목록을 검색하려면 다음을 수행합니다.
고객 ID와 함께 IAggregatePartner.Customers.ById 메서드를 사용하여 고객을 식별합니다.
SubscribedSkus 속성 값을 가져와 고객이 구독한 SKU 컬렉션 작업에 대한 인터페이스를 검색합니다.
// string selectedCustomerId;
// IAggregatePartner partnerOperations;
var customerUserSubscribedSkus = partnerOperations.Customers.ById(selectedCustomerId).SubscribedSkus.Get();
예제는 다음을 참조하세요.
- 샘플: 콘솔 테스트 앱
- 프로젝트: 파트너 센터 SDK 샘플
- 클래스: GetCustomerSubscribedSkus.cs
REST 요청
요청 구문
메서드 | 요청 URI |
---|---|
GET | {baseURL}/v1/customers/{customer-id}/subscribedskus HTTP/1.1 |
URI 매개 변수
다음 경로 매개 변수를 사용하여 고객을 식별합니다.
속성 | Type | 필수 | 설명 |
---|---|---|---|
customer-id | string | 예 | 고객을 식별하는 GUID 형식 문자열입니다. |
요청 헤더
자세한 내용은 파트너 센터 REST 헤더를 참조하세요.
요청 본문
없음
요청 예제
GET https://api.partnercenter.microsoft.com/v1/customers/0c39d6d5-c70d-4c55-bc02-f620844f3fd1/subscribedskus HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 53308f82-1bf7-44e2-8dda-4517e4688bd4
MS-CorrelationId: 95660db2-7425-4021-babe-a26ddbcb0187
X-Locale: en-US
Host: api.partnercenter.microsoft.com
REST 응답
성공하면 응답 본문에 SubscribedSku 리소스 컬렉션이 포함됩니다.
응답 성공 및 오류 코드
각 응답에는 성공 또는 실패와 추가 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 추가 매개 변수를 읽을 수 있습니다. 전체 목록은 파트너 센터 REST 오류 코드를 참조 하세요.
응답 예제
HTTP/1.1 200 OK
Content-Length: 4859
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 95660db2-7425-4021-babe-a26ddbcb0187
MS-RequestId: 53308f82-1bf7-44e2-8dda-4517e4688bd4
MS-CV: 7BQ0jitzXUCLwRM6.0
MS-ServerId: 020021921
Date: Fri, 09 Jun 2017 17:50:46 GMT
{
"totalCount": 2,
"items": [{
"availableUnits": 4,
"activeUnits": 5,
"consumedUnits": 1,
"suspendedUnits": 0,
"totalUnits": 5,
"warningUnits": 0,
"productSku": {
"id": "efccb6f7-5641-4e0e-bd10-b4976e1bf68e",
"name": "Enterprise Mobility + Security E3",
"skuPartNumber": "EMS",
"targetType": "User",
"licenseGroupId": "group1"
},
"servicePlans": [{
"displayName": "Azure Information Protection Premium P1",
"serviceName": "RMS_S_PREMIUM",
"id": "6c57d4b6-3b23-47a5-9bc9-69f17b4947b3",
"capabilityStatus": "Enabled",
"targetType": "User"
}, {
"displayName": "Microsoft Intune A Direct",
"serviceName": "INTUNE_A",
"id": "c1ec4a95-1f05-45b3-a911-aa3fa01094f5",
"capabilityStatus": "Enabled",
"targetType": "User"
}, {
"displayName": "Microsoft Azure Active Directory Rights",
"serviceName": "RMS_S_ENTERPRISE",
"id": "bea4c11e-220a-4e6d-8eb8-8ea15d019f90",
"capabilityStatus": "Enabled",
"targetType": "User"
}, {
"displayName": "Azure Active Directory Premium P1",
"serviceName": "AAD_PREMIUM",
"id": "41781fb2-bc02-4b7c-bd55-b576c07bb09d",
"capabilityStatus": "Enabled",
"targetType": "User"
}, {
"displayName": "Microsoft Azure Multifactor Authentication",
"serviceName": "MFA_PREMIUM",
"id": "8a256a2b-b617-496d-b51b-e76466e88db0",
"capabilityStatus": "Enabled",
"targetType": "User"
}
],
"capabilityStatus": "Enabled",
"attributes": {
"objectType": "SubscribedSku"
}
}, {
"availableUnits": 0,
"activeUnits": 1,
"consumedUnits": 1,
"suspendedUnits": 0,
"totalUnits": 1,
"warningUnits": 0,
"productSku": {
"id": "f8a1db68-be16-40ed-86d5-cb42ce701560",
"name": "Power BI Pro",
"skuPartNumber": "POWER_BI_PRO",
"targetType": "User",
"licenseGroupId": "group1"
},
"servicePlans": [{
"displayName": "Exchange Foundation",
"serviceName": "EXCHANGE_S_FOUNDATION",
"id": "113feb6c-3fe4-4440-bddc-54d774bf0318",
"capabilityStatus": "Enabled",
"targetType": "Tenant"
}, {
"displayName": "Power BI Pro",
"serviceName": "BI_AZURE_P2",
"id": "70d33638-9c74-4d01-bfd3-562de28bd4ba",
"capabilityStatus": "Enabled",
"targetType": "User"
}
],
"capabilityStatus": "Enabled",
"attributes": {
"objectType": "SubscribedSku"
}
}
],
"attributes": {
"objectType": "Collection"
}
}
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기