共用方式為


取得客戶授權部署資訊

如何取得特定客戶的授權部署深入解析。

注意

取得 授權部署資訊會取代此案例。

必要條件

認證,如合作夥伴中心驗證所述。 此案例支援使用應用程式加上使用者的認證來進行驗證。

C#

若要擷取指定客戶的部署匯總資料,請先使用客戶識別碼呼叫 IAggregatePartner.Customers.ById 方法來識別客戶。 然後從 Analytics 屬性取得客戶層級分析集合作業的介面。 接下來,從 Licenses 屬性擷取客戶層級授權分析集合的介面。 最後,呼叫 Deployment.Get 方法來取得授權部署上的匯總資料。 如果方法成功,您將取得 CustomerLicensesDeploymentInsights 物件的集合。

// IAggregatePartner partnerOperations;
// string customerIdToRetrieve;

var customerLicensesDeploymentAnalytics = partnerOperations.Customers.ById(customerIdToRetrieve).Analytics.Licenses.Deployment.Get();

REST 要求

要求的語法

方法 要求 URI
GET {baseURL}/v1/customers/{customer-id}/analytics/licenses/deployment HTTP/1.1

URI 參數

使用下列路徑參數來識別客戶。

名稱 類型 必要 描述
customer-id guid Yes 識別客戶的 GUID 格式客戶識別碼。

要求標頭

如需詳細資訊,請參閱合作夥伴中心 REST 標頭

要求本文

無。

要求範例

GET https://api.partnercenter.microsoft.com/v1/customers/4d3cf487-70f4-4e1e-9ff1-b2bfce8d9f04/analytics/licenses/deployment HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: b01b8759-4dbe-4605-adb7-e5839a796c33
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Host: api.partnercenter.microsoft.com

REST 回應

如果成功,回應本文會包含 CustomerLicensesDeploymentInsights 資源的集合,可提供所部署授權的相關資訊。

回應成功和錯誤碼

每個回應都隨附 HTTP 狀態碼,會指出成功與否以及其他的偵錯資訊。 請使用網路追蹤工具來讀取此錯誤碼、錯誤類型和其他參數。 如需完整清單,請參閱合作夥伴中心的 REST 錯誤碼

回應範例

HTTP/1.1 200 OK
Content-Length: 1012
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: b01b8759-4dbe-4605-adb7-e5839a796c33
MS-CV: deEp2Wy6DUitMCYA.0
MS-ServerId: 102030524
Date: Wed, 15 Mar 2017 01:19:18 GMT

{
    "totalCount": 3,
    "items": [{
            "customerName": "DT DEMO CSP CUSTOMER 005",
            "productName": "OFFICE 365 BUSINESS ESSENTIALS",
            "licensesDeployed": 0,
            "deploymentPercent": 0.0,
            "licensesSold": 1,
            "processedDateTime": "2017-03-14T03:25:16.36+00:00",
            "serviceName": "o365",
            "channel": "reseller",
            "attributes": {
                "objectType": "CustomerLicensesDeploymentInsights"
            }
        }, {
            "customerName": "DT DEMO CSP CUSTOMER 005",
            "productName": "EXCHANGE ONLINE (PLAN 1)",
            "licensesDeployed": 0,
            "deploymentPercent": 0.0,
            "licensesSold": 5,
            "processedDateTime": "2017-03-14T03:25:16.36+00:00",
            "serviceName": "o365",
            "channel": "reseller",
            "attributes": {
                "objectType": "CustomerLicensesDeploymentInsights"
            }
        }, {
            "customerName": "DT DEMO CSP CUSTOMER 005",
            "productName": "EXCHANGE ONLINE ARCHIVING FOR EXCHANGE ONLINE",
            "licensesDeployed": 0,
            "deploymentPercent": 0.0,
            "licensesSold": 2,
            "processedDateTime": "2017-03-14T03:25:16.36+00:00",
            "serviceName": "o365",
            "channel": "reseller",
            "attributes": {
                "objectType": "CustomerLicensesDeploymentInsights"
            }
        }
    ],
    "attributes": {
        "objectType": "Collection"
    }
}