Share via


User Assigned Identities - List By Subscription

清單 指定訂用帳戶下提供的所有 userAssignedIdentities。

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31

URI 參數

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

string

身分識別所屬之訂用帳戶的標識碼。

api-version
query True

string

要叫用的 API 版本。

回應

名稱 類型 Description
200 OK

UserAssignedIdentitiesListResult

正常。 已擷取並成功傳回userAssignedIdentities的清單。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

IdentityListBySubscription

Sample Request

GET https://management.azure.com/subscriptions/subid/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName",
      "location": "eastus",
      "name": "identityName",
      "properties": {
        "clientId": "4024ab25-56a8-4370-aea6-6389221caf29",
        "principalId": "25cc773c-7f05-40fc-a104-32d2300754ad",
        "tenantId": "b6c948ef-f6b5-4384-8354-da3a15eca969"
      },
      "tags": {
        "key1": "value1",
        "key2": "value2"
      },
      "type": "Microsoft.ManagedIdentity/userAssignedIdentities"
    }
  ],
  "nextLink": "https://serviceRoot/subscriptions/subId/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31&$skiptoken=X'12345'"
}

定義

名稱 Description
CloudError

來自 ManagedServiceIdentity 服務的錯誤回應。

CloudErrorBody

來自 ManagedServiceIdentity 服務的錯誤回應。

createdByType

建立資源的身分識別類型。

Identity

描述身分識別資源。

systemData

與建立和上次修改資源相關的元數據。

UserAssignedIdentitiesListResult

List 作業所傳回的值。

CloudError

來自 ManagedServiceIdentity 服務的錯誤回應。

名稱 類型 Description
error

CloudErrorBody

錯誤的其他詳細數據清單。

CloudErrorBody

來自 ManagedServiceIdentity 服務的錯誤回應。

名稱 類型 Description
code

string

錯誤的識別碼。

details

CloudErrorBody[]

錯誤的其他詳細數據清單。

message

string

描述錯誤的訊息,適用於在使用者介面中顯示。

target

string

特定錯誤的目標。 例如,錯誤中屬性的名稱。

createdByType

建立資源的身分識別類型。

名稱 類型 Description
Application

string

Key

string

ManagedIdentity

string

User

string

Identity

描述身分識別資源。

名稱 類型 Description
id

string

資源的完整資源識別碼。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

location

string

資源所在的地理位置

name

string

資源的名稱

properties.clientId

string

與身分識別相關聯的應用程式識別碼。 這是 MSI 產生的隨機 UUID。

properties.principalId

string

與所建立身分識別相關聯的服務主體對象的標識碼。

properties.tenantId

string

身分識別所屬租用戶的標識碼。

systemData

systemData

Azure Resource Manager 包含 createdBy 和 modifiedBy 資訊的中繼資料。

tags

object

資源標籤。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string

資源建立的時間戳 (UTC) 。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。

UserAssignedIdentitiesListResult

List 作業所傳回的值。

名稱 類型 Description
nextLink

string

如果有的話,取得下一頁結果的 URL。

value

Identity[]

清單作業所傳回的userAssignedIdentities集合。