共用方式為


Access Control - List Users

取得所有主體 (使用者) 在租使用者範圍內指派角色。

GET https://prod.core.sphere.azure.net/v2/tenants/{tenantId}/users

URI 參數

名稱 位於 必要 類型 Description
tenantId
path True

string

uuid

要在其中取得角色的租使用者識別碼。

回應

名稱 類型 Description
200 OK

AccessControlPrincipalsResponse

成功。

範例

List users

Sample Request

GET https://prod.core.sphere.azure.net/v2/tenants/768c2cd6-1bf0-4521-9f53-084a331d81cb/users

Sample Response

{
  "TenantId": "768c2cd6-1bf0-4521-9f53-084a331d81cb",
  "Principals": [
    {
      "PrincipalId": "474dfa25-a681-4bda-9932-7d42354c944d",
      "DisplayName": "Avery Howard",
      "Mail": "avery@contoso.com",
      "Roles": [
        "Administrator",
        "Contributor"
      ]
    },
    {
      "PrincipalId": "599c0db8-e54a-4ccf-9c39-67cc22038597",
      "DisplayName": "Parker Jones",
      "Mail": "parker@contoso.com",
      "Roles": [
        "Contributor"
      ]
    }
  ]
}

定義

名稱 Description
AccessControlPrincipal
AccessControlPrincipalsResponse

AccessControlPrincipal

名稱 類型 Description
DisplayName

string

取得或設定使用者的相關顯示名稱。

Mail

string

取得或設定使用者的相關電子郵件。

PrincipalId

string

取得或設定使用者/服務主體的主體識別碼。

Roles

string[]

取得或設定指派其他 PrincipalId 的角色

AccessControlPrincipalsResponse

名稱 類型 Description
Principals

AccessControlPrincipal[]

取得或設定主體集合,其中包含在此租使用者中指派的角色。

TenantId

string

取得或設定 Azure Sphere 租使用者的識別碼。