你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Organizations - List

获取用户在应用程序中有权访问的组织列表

GET https://{subdomain}.{baseDomain}/api/organizations?api-version=2022-07-31

URI 参数

名称 必需 类型 说明
baseDomain
path True

string

所有 Azure IoT Central 服务请求的基域。

subdomain
path True

string

应用程序子域。

api-version
query True

string

正在调用的 API 的版本。

响应

名称 类型 说明
200 OK

OrganizationCollection

成功

Other Status Codes

Error

从 IoT Central 服务收到的错误响应。

Headers

x-ms-error-code: string

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

List organizations

Sample Request

GET https://appsubdomain.azureiotcentral.com/api/organizations?api-version=2022-07-31

Sample Response

{
  "value": [
    {
      "id": "us",
      "displayName": "United States"
    },
    {
      "id": "washington",
      "displayName": "Washington",
      "parent": "us"
    },
    {
      "id": "seattle",
      "displayName": "Seattle",
      "parent": "washington"
    }
  ]
}

定义

名称 说明
Error

响应错误定义。

ErrorDetails

错误的详细信息。

Organization

组织定义。

OrganizationCollection

组织的分页结果。

Error

响应错误定义。

名称 类型 说明
error

ErrorDetails

当前请求的错误详细信息。

ErrorDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

message

string

错误消息详细信息。

requestId

string

当前请求的相关 ID。

time

string

错误请求失败的时间。

Organization

组织定义。

名称 类型 说明
displayName

string

组织的显示名称。

id

string

组织的唯一 ID。

parent

string

组织父级的 ID。

OrganizationCollection

组织的分页结果。

名称 类型 说明
nextLink

string

用于获取组织的下一页的 URL。

value

Organization[]

组织的集合。