分享方式:


取得客戶組織

適用于:合作夥伴中心

取得客戶組織 資源。

必要條件

  • 認證,如合作夥伴中心驗證所述。 此案例支援應用程式+使用者認證或僅限應用程式驗證。

  • 客戶識別碼 (customer-tenant-id)。 如果您不知道客戶的識別碼,您可以在合作夥伴中心 查閱 從合作夥伴中心首頁選取 [客戶 ] 工作區。 從 [客戶] 清單中 選取客戶,然後選取 [ 帳戶 ]。 在客戶的 [帳戶] 頁面上,在 [客戶帳戶詳細資料] 區段中 尋找 Microsoft 識別碼 。 Microsoft 識別碼與客戶識別碼 (customer-tenant-id) 相同。

重要

需要 GDAP 角色才能呼叫此 API。 不支援 DAP。 仍然需要合作夥伴驗證(AdminAgent/HelpDeskAgent/SalesAgent)

GDAP 角色

您至少需要下列其中一個 GDAP 角色:

  • 全域系統管理員
  • 目錄寫入器
  • 全域讀取者

REST 要求

要求語法

方法 要求 URI
GET {baseURL} /v1/customers/{customer-tenant-id}/organization HTTP/1.1

URI 參數

將下列查詢參數用於特定客戶。

名稱 類型​​ 必填 描述
customer-tenant-id guid Y 此值是 GUID 格式的客戶 租使用者識別碼 ,可讓轉銷商篩選屬於轉銷商之指定客戶的結果。

要求標頭

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

要求本文

無。

要求範例

GET https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/organization HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-CorrelationId: a176c585-b5de-4d65-824c-67a6deb45cd9
MS-RequestId: 74ca1db9-df92-41c6-a362-a16433b0542b

REST 回應

如果成功,這個方法會在回應本文中傳 回 Customer 資源。

回應成功和錯誤碼

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

回應範例

HTTP/1.1 200 OK
Content-Length: 1530
Content-Type: application/json; charset=utf-8
MS-CorrelationId: a176c585-b5de-4d65-824c-67a6deb45cd9
MS-RequestId: 74ca1db9-df92-41c6-a362-a16433b0542b

[
  {
    "street": "1 Microsoft Way",
    "countryLetterCode": "US",
    "postalCode": "98052-8300",
    "city": "Redmond",
    "state": "WA",
    "displayName": "Contoso",
    "technicalNotificationMails": [
      "test@contoso.com"
    ]
  }
]

下一步