Items - Associate Identity (beta)

將預設身份與物品關聯。

備註

此 API 屬於 Beta 版本,僅供評估與開發用途。 它可能會根據意見反應而變更,不建議用於生產環境。 呼叫此 API 時,呼叫端必須指定 true 為查詢參數 beta的值。

此 API 支援 長時間執行的作業 (LRO)。

此 API 支援數個項目類型、在 專案管理概觀中找到支援的項目類型和其定義結構的相關信息,。

許可

呼叫端必須具有專案的 讀取和寫入 許可權。

必要的委派範圍

針對專案 API,請使用下列範圍類型:

  • 泛型範圍:Item.ReadWrite.All
  • 特定範圍:itemType。ReadWrite.All (例如:Notebook.ReadWrite.All)

如需範圍的詳細資訊,請參閱:範圍一文。

Microsoft Entra 支援的身份

此 API 支援本節列出的 Microsoft identities。

身分識別 支援
User 是的
服務主體 和 受控識別 支援呼叫中的項目類型時。 檢查您要呼叫的專案類型對應的 API,以查看您的呼叫是否受到支援。

介面

POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/identities/default/assign?beta={beta}

URI 參數

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

string (uuid)

項目標識碼。

workspaceId
path True

string (uuid)

工作區識別碼。

beta
query True

boolean

必須設定這個必要的參數才能 true 存取目前處於測試階段的 API。

要求本文

名稱 必要 類型 Description
assignmentType True

IdentityAssignmentEntityType

會提出關聯身份請求的主體類型。

回覆

名稱 類型 Description
200 OK

UpdateItemIdentityResponse

要求成功完成。

202 Accepted

請求已接受,身份關聯正在進行中。

標題

  • Location: string
  • Retry-After: integer
429 Too Many Requests

ErrorResponse

服務費率上限被超標。 伺服器會回傳一個 Retry-After 標頭,以秒數表示客戶端在發送額外請求前必須等待多久。

標題

Retry-After: integer

Other Status Codes

ErrorResponse

常見的錯誤碼:

  • ItemNotFound - 找不到要求的專案。

  • InvalidRequest - 無效關聯請求。

範例

Associate identity example

範例要求

POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff229/items/5b218778-e7a5-4d73-8187-f10824047715/identities/default/assign?beta=True

{
  "assignmentType": "Caller"
}

範例回覆

{
  "assignmentStatus": [
    {
      "itemId": "eab1679a-8cab-40d6-9ba6-5c2a07a7ce81",
      "status": "Succeeded"
    },
    {
      "itemId": "8eedb1b0-3af8-4b17-8e7e-663e61e12211",
      "parentItemId": "eab1679a-8cab-40d6-9ba6-5c2a07a7ce81",
      "status": "Succeeded"
    },
    {
      "itemId": "83b128a3-f58f-4eee-ab0b-e7e25a748f54",
      "parentItemId": "eab1679a-8cab-40d6-9ba6-5c2a07a7ce81",
      "status": "Failed",
      "errorInfo": {
        "errorCode": "AssignmentFailed",
        "message": "The assignment operation failed due to insufficient permissions."
      }
    }
  ]
}
Location: https://api.fabric.microsoft.com/v1/operations/427f6c34-b64e-4ee4-8ea5-b533c0e203ef
x-ms-operation-id: 427f6c34-b64e-4ee4-8ea5-b533c0e203ef
Retry-After: 30

定義

名稱 Description
ErrorParameter

一個結構化參數,提供關於錯誤的額外機器可讀上下文。

ErrorRelatedResource

錯誤相關的資源詳細資料物件。

ErrorResponse

錯誤回應。

ErrorResponseDetails

錯誤回應的細節。

IdentityAssignmentEntityType

會提出關聯身份請求的主體類型。

IdentityAssignmentStatusType

身份分配的狀態。 可能會隨著時間新增其他狀態。

ItemAssignmentStatus

一個項目的身份指派狀態。

UpdateItemIdentityRequest

關聯身份請求有效載荷。

UpdateItemIdentityResponse

關聯身份回應。

ErrorParameter

一個結構化參數,提供關於錯誤的額外機器可讀上下文。

名稱 類型 Description
message

string

一個人類可讀的參數意義描述。

name

string

參數識別碼。

value

string

這是參數值。

ErrorRelatedResource

錯誤相關的資源詳細資料物件。

名稱 類型 Description
resourceId

string

發生錯誤的資源識別碼。

resourceType

string

發生錯誤的資源類型。

ErrorResponse

錯誤回應。

名稱 類型 Description
errorCode

string

提供錯誤狀況相關信息的特定標識碼,允許服務與其使用者之間的標準化通訊。

isRetriable

boolean

若屬實,請求可重新嘗試。 如果有延遲,請使用 Retry-After 回應標頭來判斷延遲。

message

string

以人類可讀格式呈現的錯誤訊息。

moreDetails

ErrorResponseDetails[]

其他錯誤詳情的清單。

parameters

ErrorParameter[]

結構化參數提供更多機器可讀的錯誤上下文。

relatedResource

ErrorRelatedResource

與錯誤相關的資源詳情。

requestId

string (uuid)

與錯誤相關聯的要求識別碼。

ErrorResponseDetails

錯誤回應的細節。

名稱 類型 Description
errorCode

string

提供錯誤狀況相關信息的特定標識碼,允許服務與其使用者之間的標準化通訊。

message

string

以人類可讀格式呈現的錯誤訊息。

parameters

ErrorParameter[]

結構化參數提供更多機器可讀的錯誤上下文。

relatedResource

ErrorRelatedResource

與錯誤相關的資源詳情。

IdentityAssignmentEntityType

會提出關聯身份請求的主體類型。

值 Description
Caller

使用者或服務主體提出關聯身份請求。

IdentityAssignmentStatusType

身份分配的狀態。 可能會隨著時間新增其他狀態。

值 Description
Succeeded

身份被成功分配到該項目上。

Failed

身份分配失敗了。

ItemAssignmentStatus

一個項目的身份指派狀態。

名稱 類型 Description
errorInfo

ErrorResponseDetails

如果身份指派失敗,則會顯示錯誤資訊。

itemId

string (uuid)

項目的標識碼。

parentItemId

string (uuid)

父項目的識別碼。

status

IdentityAssignmentStatusType

身份分配的狀態。 可能會隨著時間新增其他狀態。

UpdateItemIdentityRequest

關聯身份請求有效載荷。

名稱 類型 Description
assignmentType

IdentityAssignmentEntityType

會提出關聯身份請求的主體類型。

UpdateItemIdentityResponse

關聯身份回應。

名稱 類型 Description
assignmentStatus

ItemAssignmentStatus[]

更新後分配給該物品的身份。