管理 Azure 機器學習 工作區的存取權

本文說明如何管理 Azure 機器學習 工作區的存取權(授權)。 您可以使用 Azure 角色型存取控制 (Azure RBAC) 來管理 Azure 資源的存取權,讓使用者能夠建立新的資源或使用現有的資源。 Microsoft Entra 識別碼中的用戶會獲指派特定角色,以授與資源的存取權。 Azure 同時提供內建角色和建立自定義角色的能力。

提示

雖然本文著重於 Azure 機器學習,但個別服務會提供自己的 RBAC 設定。 例如,使用本文中的資訊,您可以設定誰可以將評分要求提交至部署為 Azure Kubernetes Service 上 Web 服務的模型。 但 Azure Kubernetes Service 提供自己的一組 Azure 角色。 如需 Azure 機器學習 可能有用的服務特定 RBAC 資訊,請參閱下列連結:

警告

套用某些角色可能會限制其他使用者 Azure Machine Learning 工作室 中的UI功能。 例如,如果使用者的角色無法建立計算實例,則無法在 Studio 中使用建立計算實例的選項。 這是預期的行為,並防止使用者嘗試傳回拒絕存取錯誤的作業。

預設角色

Azure 機器學習 工作區具有預設可用的內建角色。 將使用者新增至工作區時,可以指派下列其中一個角色。

角色 存取層級
AzureML 資料科學家 除了建立或刪除計算資源及修改工作區本身之外,可以在 Azure 機器學習 工作區內執行所有動作。
AzureML 計算運算符 可以在工作區內建立、管理、刪除和存取計算資源。
讀取者 工作區中的只讀動作。 讀者可以在工作區中列出和檢視資產,包括 數據存放區 認證。 讀者無法刪除或更新這些資產。
參與者 在工作區中檢視、建立、編輯或刪除 (如果適用) 資產。 例如,參與者可以建立實驗、建立或連結計算叢集、提交執行,以及部署 Web 服務。
擁有者 工作區的完整存取權,包括檢視、建立、編輯或刪除工作區中資產的能力。 此外,您可以變更角色指派。

此外,Azure 機器學習 登錄具有 AzureML 登錄使用者角色,可指派給登錄資源,以授與數據科學家的用戶層級許可權。 若要讓系統管理員層級的許可權建立或刪除登錄,請使用參與者或擁有者角色。

角色 存取層級
AzureML 登錄使用者 可以取得登錄,以及讀取、寫入和刪除其中的資產。 無法建立新的登錄資源或刪除它們。

您可以結合角色來授與不同層級的存取權。 例如,您可以授與工作區使用者 AzureML 資料科學家 和 AzureML 計算操作員角色,以允許使用者在以自助方式建立計算時執行實驗。

重要

角色存取的範圍可設定為 Azure 中的多個層級。 例如,具有工作區擁有者存取權的人員可能沒有包含工作區之資源群組的擁有者存取權。 如需詳細資訊,請參閱 Azure RBAC 的運作方式。

管理工作區存取

如果您是工作區的擁有者,您可以新增和移除工作區的角色。 您也可以將角色指派給使用者。 使用下列連結來探索如何管理存取權:

例如,使用 Azure CLI,使用下列命令,將參與者角色指派joe@contoso.com資源群組 this-rg

az role assignment create --role "Contributor" --assignee "joe@contoso.com" --resource-group this-rg

使用 Microsoft Entra 安全組來管理工作區存取

您可以使用 Microsoft Entra 安全組來管理工作區的存取權。 此方法有下列優點:

  • 小組或項目領導者可以管理使用者以安全組擁有者身分存取工作區,而不需要直接在工作區資源上扮演擁有者角色。
  • 您可以將工作區和其他資源的許可權組織、管理及撤銷為群組,而不需要依使用者管理許可權。
  • 使用 Microsoft Entra 群組可協助您避免達到角色指派的 訂用帳戶限制

若要使用 Microsoft Entra 安全組:

  1. 建立安全組
  2. 新增群組擁有者。 此使用者有權新增或移除群組成員。 群組擁有者不需要是群組成員,或在工作區上具有直接的 RBAC 角色。
  3. 在工作區上指派 RBAC 角色,例如 AzureML 資料科學家、讀取者或參與者。
  4. 新增群組成員。 成員可存取工作區。

建立自定義角色

如果內建角色不足,您可以建立自定義角色。 自定義角色可能會擁有該工作區中的讀取、寫入、刪除和計算資源許可權。 您可以在特定工作區層級、特定資源群組層級或特定訂用帳戶層級提供角色。

注意

您必須是該層級的資源擁有者,才能在該資源內建立自定義角色。

若要建立自定義角色,請先建構角色定義 JSON 檔案,以指定角色的許可權和範圍。 下列範例會定義特定工作區層級範圍的自訂 資料科學家 自定義角色:

data_scientist_custom_role.json

{
    "Name": "Data Scientist Custom",
    "IsCustom": true,
    "Description": "Can run experiment but can't create or delete compute.",
    "Actions": ["*"],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/*/delete",
        "Microsoft.MachineLearningServices/workspaces/write",
        "Microsoft.MachineLearningServices/workspaces/computes/*/write",
        "Microsoft.MachineLearningServices/workspaces/computes/*/delete", 
        "Microsoft.Authorization/*/write"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.MachineLearningServices/workspaces/<workspaceName>"
    ]
}

提示

您可以變更 AssignableScopes 欄位,以在訂用帳戶層級、資源群組層級或特定工作區層級設定此自定義角色的範圍。 上述自定義角色只是範例,請參閱 Azure 機器學習 服務的一些建議自定義角色。

此自訂角色可以在工作區中執行所有動作,但下列動作除外:

  • 它無法刪除工作區。
  • 它無法建立或更新工作區。
  • 它無法建立或更新計算資源。
  • 它無法刪除計算資源。
  • 它無法新增、刪除或改變角色指派。

若要部署此自定義角色,請使用下列 Azure CLI 命令:

az role definition create --role-definition data_scientist_custom_role.json

部署之後,此角色就會在指定的工作區中提供。 現在您可以在 Azure 入口網站 中新增並指派此角色。

如需有關自訂角色的詳細資訊,請參閱 Azure 自訂角色

Azure 機器學習 作業

如需可搭配自定義角色使用之作業(動作和非動作)的詳細資訊,請參閱 資源提供者作業。 您也可以使用下列 Azure CLI 命令來列出作業:

az provider operation show –n Microsoft.MachineLearningServices

列出自定義角色

在 Azure CLI 中執行下列命令:

az role definition list --subscription <subscriptionId> --custom-role-only true

若要檢視特定自定義角色的角色定義,請使用下列 Azure CLI 命令。 <roleName>應該使用上一個命令所傳回的相同格式:

az role definition list -n <roleName> --subscription <subscriptionId>

更新自定義角色

在 Azure CLI 中執行下列命令:

az role definition update --role-definition update_def.json --subscription <subscriptionId>

您必須擁有新角色定義之整個範圍的許可權。 例如,如果這個新角色在三個訂用帳戶之間有範圍,您必須擁有這三個訂用帳戶的許可權。

注意

角色更新可能需要 15 分鐘到一小時的時間,才能套用到該範圍中的所有角色指派。

使用 Azure Resource Manager 範本進行重複性

如果您預期需要重新建立複雜的角色指派,Azure Resource Manager 範本可能相當有説明。 machine-learning-dependencies-role-assignment 範本會顯示如何在原始程式碼中指定角色指派以供重複使用。

常見案例

下表摘要說明 Azure 機器學習 活動,以及至少執行這些活動所需的許可權。 例如,如果活動可以使用工作區範圍執行 (Column 4),則具有該許可權的所有較高範圍也會自動運作。 針對特定活動,V1 和 V2 API 的許可權不同。

重要

這個資料表中以 開頭/的所有路徑都是 Microsoft.MachineLearningServices/相對路徑

活動 訂用帳戶層級範圍 資源群組層級範圍 工作區層級範圍
建立新的工作區 1 非必要 擁有者或參與者 N/A (在建立後成為擁有者或繼承較高的範圍角色)
要求訂用帳戶層級 Amlcompute 配額或設定工作區層級配額 擁有者、參與者或自定義角色
允許 /locations/updateQuotas/action
訂用帳戶範圍
未獲授權 未獲授權
建立新的計算叢集 非必要 非必要 允許的擁有者、參與者或自訂角色: /workspaces/computes/write
建立新的計算實例 非必要 非必要 允許的擁有者、參與者或自訂角色: /workspaces/computes/write
提交任何類型的執行 (V1) 非必要 非必要 擁有者、參與者或自定義角色允許:/workspaces/*/read、、、/workspaces/experiments/runs/write、、/workspaces/metadata/artifacts/write/workspaces/metadata/snapshots/write/workspaces/environments/build/action/workspaces/experiments/runs/submit/action/workspaces/environments/write/workspaces/environments/readSecrets/action
提交任何類型的執行 (V2) 非必要 非必要 擁有者、參與者或自定義角色允許:/workspaces/*/read、、、/workspaces/environments/write/workspaces/jobs/*/workspaces/metadata/artifacts/write/workspaces/metadata/codes/*/write/workspaces/environments/build/action/workspaces/environments/readSecrets/action
發佈管線和端點 (V1) 非必要 非必要 擁有者、參與者或自定義角色允許:/workspaces/endpoints/pipelines/*、、 /workspaces/pipelinedrafts/*/workspaces/modules/*
發佈管線和端點 (V2) 非必要 非必要 擁有者、參與者或自定義角色允許:/workspaces/endpoints/pipelines/*、、 /workspaces/pipelinedrafts/*/workspaces/components/*
附加 AKS 資源 2 非必要 包含 AKS 的資源群組擁有者或參與者
在 AKS/ACI 資源上部署已註冊的模型 非必要 非必要 擁有者、參與者或自訂角色允許: /workspaces/services/aks/write/workspaces/services/aci/write
針對已部署的 AKS 端點評分 非必要 非必要 擁有者、參與者或自定義角色允許: /workspaces/services/aks/score/action/workspaces/services/aks/listkeys/action (當您不使用 Microsoft Entra 驗證時)或 /workspaces/read (當您使用令牌驗證時)
使用互動式筆記本存取記憶體 非必要 非必要 擁有者、參與者或自定義角色允許:/workspaces/computes/read、、、/workspaces/notebooks/samples/read/workspaces/notebooks/storage/*/workspaces/listStorageAccountKeys/action/workspaces/listNotebookAccessToken/read
建立新的自定義角色 允許的擁有者、參與者或自定義角色 Microsoft.Authorization/roleDefinitions/write 非必要 允許的擁有者、參與者或自訂角色: /workspaces/computes/write
建立/管理在線端點和部署 非必要 若要在 Studio 上部署, Microsoft.Resources/deployments/write 允許 Microsoft.MachineLearningServices/workspaces/onlineEndpoints/*的擁有者、參與者或自定義角色。
擷取在線端點的驗證認證 非必要 非必要 允許和的擁有者、參與者或自定義角色Microsoft.MachineLearningServices/workspaces/onlineEndpoints/token/actionMicrosoft.MachineLearningServices/workspaces/onlineEndpoints/listkeys/action
  1. 如果您第一次嘗試建立工作區時收到失敗,請確定您的角色允許 Microsoft.MachineLearningServices/register/action。 此動作可讓您向 Azure 訂用帳戶註冊 Azure 機器學習 資源提供者。

  2. 附加 AKS 叢集時,您也需要讓叢集上的 Azure Kubernetes Service 叢集 管理員 角色

部署到虛擬網路或子網

  • 若要將資源部署到虛擬網路或子網路,在 Azure 角色型存取控制 (Azure RBAC) 中,您的使用者帳戶必須具有下列動作的權限:

    • 虛擬網路資源上的 "Microsoft.Network/*/read"。 Azure Resource Manager (ARM) 範本部署不需要此權限。
    • 虛擬網路資源上的 "Microsoft.Network/virtualNetworks/join/action"。
    • 子網路資源上的 "Microsoft.Network/virtualNetworks/subnets/join/action"。

    如需 Azure RBAC 搭配網路的詳細資訊,請參閱網路內建角色

V1 和 V2 API 動作之間的差異

V1 API 和 V2 API 的動作之間有某些差異。

資產 V1 API 的動作路徑 V2 API 的動作路徑
資料集 Microsoft.MachineLearningServices/workspaces/datasets Microsoft.MachineLearningServices/workspaces/datasets/versions
實驗執行和作業 Microsoft.MachineLearningServices/workspaces/experiments Microsoft.MachineLearningServices/workspaces/jobs
模型 Microsoft.MachineLearningServices/workspaces/models Microsoft.MachineLearningServices/workspaces/models/versions
快照集和程序代碼 Microsoft.MachineLearningServices/workspaces/snapshots Microsoft.MachineLearningServices/workspaces/code/versions
模組和元件 Microsoft.MachineLearningServices/workspaces/modules Microsoft.MachineLearningServices/workspaces/components

您可以同時包含這兩個動作,或使用包含這兩個動作的通配符,讓自訂角色與 V1 和 V2 API 相容,例如 Microsoft.MachineLearningServices/workspaces/datasets/*/read

使用客戶管理的金鑰建立工作區

使用客戶管理的金鑰 (CMK) 時,會使用 Azure 金鑰保存庫 來儲存金鑰。 用來建立工作區的用戶或服務主體必須擁有密鑰保存庫的擁有者或參與者存取權。

在密鑰保存庫中,用戶或服務主體必須具有透過金鑰保存庫存取原則來建立、取得、刪除和清除密鑰的存取權。 如需詳細資訊,請參閱 Azure Key Vault 安全性

Azure 機器學習 計算叢集的使用者指派受控識別

若要將使用者指派的身分識別指派給 Azure 機器學習 計算叢集,您需要建立計算和受控識別操作員角色寫入許可權。 如需 Azure RBAC 與受控識別的詳細資訊,請參閱 如何管理使用者指派的身分識別

MLflow 作業

若要使用 Azure 機器學習 工作區執行 MLflow 作業,請使用下列範圍您的自定義角色:

MLflow 作業 範圍
(V1)列出、讀取、建立、更新或刪除實驗 Microsoft.MachineLearningServices/workspaces/experiments/*
(V2)列出、讀取、建立、更新或刪除作業 Microsoft.MachineLearningServices/workspaces/jobs/*
依名稱取得已註冊的模型、擷取登錄中所有已註冊模型的清單、搜尋已註冊的模型、每個要求階段的最新版本模型、取得已註冊的模型版本、搜尋模型版本、取得儲存模型版本成品的 URI、依實驗標識符搜尋執行 Microsoft.MachineLearningServices/workspaces/models/*/read
建立新的已註冊模型、更新已註冊模型的名稱/描述、重新命名現有的已註冊模型、建立新版本的模型、更新模型版本的描述、將已註冊的模型轉換為其中一個階段 Microsoft.MachineLearningServices/workspaces/models/*/write
刪除已註冊的模型及其所有版本,刪除已註冊模型的特定版本 Microsoft.MachineLearningServices/workspaces/models/*/delete

範例自定義角色

資料科學家

允許數據科學家在工作區 內執行所有作業,但除外

  • 建立計算
  • 將模型部署到生產 AKS 叢集
  • 在生產環境中部署管線端點

data_scientist_custom_role.json

{
    "Name": "Data Scientist Custom",
    "IsCustom": true,
    "Description": "Can run experiment but can't create or delete compute or deploy production endpoints.",
    "Actions": [
        "Microsoft.MachineLearningServices/workspaces/*/read",
        "Microsoft.MachineLearningServices/workspaces/*/action",
        "Microsoft.MachineLearningServices/workspaces/*/delete",
        "Microsoft.MachineLearningServices/workspaces/*/write"
    ],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/delete",
        "Microsoft.MachineLearningServices/workspaces/write",
        "Microsoft.MachineLearningServices/workspaces/computes/*/write",
        "Microsoft.MachineLearningServices/workspaces/computes/*/delete", 
        "Microsoft.Authorization/*",
        "Microsoft.MachineLearningServices/workspaces/computes/listKeys/action",
        "Microsoft.MachineLearningServices/workspaces/listKeys/action",
        "Microsoft.MachineLearningServices/workspaces/services/aks/write",
        "Microsoft.MachineLearningServices/workspaces/services/aks/delete",
        "Microsoft.MachineLearningServices/workspaces/endpoints/pipelines/write"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>"
    ]
}

數據科學家受限制

在允許的動作中,沒有通配符的受限制角色定義。 它可以在工作區 內執行所有作業,但下列情況除外

  • 建立計算
  • 將模型部署到生產 AKS 叢集
  • 在生產環境中部署管線端點

data_scientist_restricted_custom_role.json :

{
    "Name": "Data Scientist Restricted Custom",
    "IsCustom": true,
    "Description": "Can run experiment but can't create or delete compute or deploy production endpoints",
    "Actions": [
        "Microsoft.MachineLearningServices/workspaces/*/read",
        "Microsoft.MachineLearningServices/workspaces/computes/start/action",
        "Microsoft.MachineLearningServices/workspaces/computes/stop/action",
        "Microsoft.MachineLearningServices/workspaces/computes/restart/action",
        "Microsoft.MachineLearningServices/workspaces/computes/applicationaccess/action",
        "Microsoft.MachineLearningServices/workspaces/notebooks/storage/write",
        "Microsoft.MachineLearningServices/workspaces/notebooks/storage/delete",
        "Microsoft.MachineLearningServices/workspaces/experiments/runs/write",
        "Microsoft.MachineLearningServices/workspaces/experiments/write",
        "Microsoft.MachineLearningServices/workspaces/experiments/runs/submit/action",
        "Microsoft.MachineLearningServices/workspaces/pipelinedrafts/write",
        "Microsoft.MachineLearningServices/workspaces/metadata/snapshots/write",
        "Microsoft.MachineLearningServices/workspaces/metadata/artifacts/write",
        "Microsoft.MachineLearningServices/workspaces/environments/write",
        "Microsoft.MachineLearningServices/workspaces/models/*/write",
        "Microsoft.MachineLearningServices/workspaces/modules/write",
        "Microsoft.MachineLearningServices/workspaces/components/*/write",
        "Microsoft.MachineLearningServices/workspaces/datasets/*/write", 
        "Microsoft.MachineLearningServices/workspaces/datasets/*/delete",
        "Microsoft.MachineLearningServices/workspaces/computes/listNodes/action",
        "Microsoft.MachineLearningServices/workspaces/environments/build/action"
    ],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/computes/write",
        "Microsoft.MachineLearningServices/workspaces/write",
        "Microsoft.MachineLearningServices/workspaces/computes/delete",
        "Microsoft.MachineLearningServices/workspaces/delete",
        "Microsoft.MachineLearningServices/workspaces/computes/listKeys/action",
        "Microsoft.MachineLearningServices/workspaces/connections/listsecrets/action",
        "Microsoft.MachineLearningServices/workspaces/listKeys/action",
        "Microsoft.Authorization/*",
        "Microsoft.MachineLearningServices/workspaces/datasets/registered/profile/read",
        "Microsoft.MachineLearningServices/workspaces/datasets/registered/preview/read",
        "Microsoft.MachineLearningServices/workspaces/datasets/unregistered/profile/read",
        "Microsoft.MachineLearningServices/workspaces/datasets/unregistered/preview/read",
        "Microsoft.MachineLearningServices/workspaces/datasets/registered/schema/read",    
        "Microsoft.MachineLearningServices/workspaces/datasets/unregistered/schema/read",
        "Microsoft.MachineLearningServices/workspaces/datastores/write",
        "Microsoft.MachineLearningServices/workspaces/datastores/delete"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>"
    ]
}

MLflow 數據科學家

允許數據科學家執行所有 MLflow Azure 機器學習 支援的作業,但除外

  • 建立計算
  • 將模型部署到生產 AKS 叢集
  • 在生產環境中部署管線端點

mlflow_data_scientist_custom_role.json:

{
    "Name": "MLFlow Data Scientist Custom",
    "IsCustom": true,
    "Description": "Can perform azureml mlflow integrated functionalities that includes mlflow tracking, projects, model registry",
    "Actions": [
        "Microsoft.MachineLearningServices/workspaces/experiments/*",
        "Microsoft.MachineLearningServices/workspaces/jobs/*",
        "Microsoft.MachineLearningServices/workspaces/models/*"
    ],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/delete",
        "Microsoft.MachineLearningServices/workspaces/write",
        "Microsoft.MachineLearningServices/workspaces/computes/*/write",
        "Microsoft.MachineLearningServices/workspaces/computes/*/delete", 
        "Microsoft.Authorization/*",
        "Microsoft.MachineLearningServices/workspaces/computes/listKeys/action",
        "Microsoft.MachineLearningServices/workspaces/listKeys/action",
        "Microsoft.MachineLearningServices/workspaces/services/aks/write",
        "Microsoft.MachineLearningServices/workspaces/services/aks/delete",
        "Microsoft.MachineLearningServices/workspaces/endpoints/pipelines/write"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>"
    ]
}

MLOps

可讓您將角色指派給服務主體,並使用該角色將 MLOps 管線自動化。 例如,若要針對已發行的管線提交執行:

mlops_custom_role.json

{
    "Name": "MLOps Custom",
    "IsCustom": true,
    "Description": "Can run pipelines against a published pipeline endpoint",
    "Actions": [
        "Microsoft.MachineLearningServices/workspaces/read",
        "Microsoft.MachineLearningServices/workspaces/endpoints/pipelines/read",
        "Microsoft.MachineLearningServices/workspaces/metadata/artifacts/read",
        "Microsoft.MachineLearningServices/workspaces/metadata/snapshots/read",
        "Microsoft.MachineLearningServices/workspaces/environments/read",    
        "Microsoft.MachineLearningServices/workspaces/metadata/secrets/read",
        "Microsoft.MachineLearningServices/workspaces/modules/read",
        "Microsoft.MachineLearningServices/workspaces/components/read",       
        "Microsoft.MachineLearningServices/workspaces/datasets/*/read",
        "Microsoft.MachineLearningServices/workspaces/datastores/read",
        "Microsoft.MachineLearningServices/workspaces/environments/write",
        "Microsoft.MachineLearningServices/workspaces/experiments/runs/read",       
        "Microsoft.MachineLearningServices/workspaces/experiments/runs/write",
        "Microsoft.MachineLearningServices/workspaces/experiments/runs/submit/action",
        "Microsoft.MachineLearningServices/workspaces/experiments/jobs/read",       
        "Microsoft.MachineLearningServices/workspaces/experiments/jobs/write",
        "Microsoft.MachineLearningServices/workspaces/metadata/artifacts/write",
        "Microsoft.MachineLearningServices/workspaces/metadata/snapshots/write",
        "Microsoft.MachineLearningServices/workspaces/metadata/codes/*/write",       
        "Microsoft.MachineLearningServices/workspaces/environments/build/action",
    ],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/computes/write",
        "Microsoft.MachineLearningServices/workspaces/write",
        "Microsoft.MachineLearningServices/workspaces/computes/delete",
        "Microsoft.MachineLearningServices/workspaces/delete",
        "Microsoft.MachineLearningServices/workspaces/computes/listKeys/action",
        "Microsoft.MachineLearningServices/workspaces/listKeys/action",
        "Microsoft.Authorization/*"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>"
    ]
}

工作區 管理員

可讓您在工作區範圍內執行所有作業, 但下列情況除外

  • 新增新的工作區
  • 指派訂用帳戶或工作區層級配額

工作區管理員也無法建立新的角色。 它只能指派工作區範圍內現有的內建或自定義角色:

workspace_admin_custom_role.json:

{
    "Name": "Workspace Admin Custom",
    "IsCustom": true,
    "Description": "Can perform all operations except quota management and upgrades",
    "Actions": [
        "Microsoft.MachineLearningServices/workspaces/*/read",
        "Microsoft.MachineLearningServices/workspaces/*/action",
        "Microsoft.MachineLearningServices/workspaces/*/write",
        "Microsoft.MachineLearningServices/workspaces/*/delete",
        "Microsoft.Authorization/roleAssignments/*"
    ],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/write"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>"
    ]
}

資料標記

數據標籤標有內建角色,僅限於標記數據。 下列自定義角色為數據標記專案提供其他層級的存取權。

卷標小組負責人可讓您檢閱和拒絕已標記的數據集,以及檢視標籤的資料集,以及檢視標籤標籤解析。 除此之外,此角色也可讓您執行標記者的角色。

labeling_team_lead_custom_role.json:

{
    "Name": "Labeling Team Lead",
    "IsCustom": true,
    "Description": "Team lead for Labeling Projects",
    "Actions": [
        "Microsoft.MachineLearningServices/workspaces/read",
        "Microsoft.MachineLearningServices/workspaces/labeling/labels/read",
        "Microsoft.MachineLearningServices/workspaces/labeling/labels/write",
        "Microsoft.MachineLearningServices/workspaces/labeling/labels/reject/action",
        "Microsoft.MachineLearningServices/workspaces/labeling/labels/update/action",
        "Microsoft.MachineLearningServices/workspaces/labeling/projects/read",
        "Microsoft.MachineLearningServices/workspaces/labeling/projects/summary/read"
    ],
    "NotActions": [
        "Microsoft.MachineLearningServices/workspaces/labeling/projects/write",
        "Microsoft.MachineLearningServices/workspaces/labeling/projects/delete",
        "Microsoft.MachineLearningServices/workspaces/labeling/export/action"
    ],
    "AssignableScopes": [
        "/subscriptions/<subscriptionId>"
    ]
}

疑難排解

以下是使用 Azure RBAC 時要注意的一些事項:

  • 當您在 Azure 中建立資源,例如工作區時,您不是資源的擁有者。 您的角色繼承自您在該訂用帳戶中授權的最高範圍角色。 例如,如果您是 Network 管理員 istrator,且具有建立 機器學習 工作區的許可權,則會將該工作區指派給 Network 管理員 istrator 角色,而不是擁有者角色。

  • 若要在工作區中執行配額作業,您需要訂用帳戶層級權限。 這表示只有在您在訂用帳戶範圍中具有寫入許可權時,才能為受控計算資源設定訂用帳戶層級配額或工作區層級配額。

  • 若要在 Studio 上部署,您需要 Microsoft.Resources/deployments/write AND Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments/write。 針對 SDK/CLI 部署,您需要 Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments/write。 請連絡您的工作區/資源群組擁有者以取得其他許可權。

  • 當有兩個角色指派給相同的 Microsoft Entra 使用者,且動作/NotActions 區段發生衝突時,如果其中一個角色也列為另一個角色中的動作,則列在 NotActions 中的作業可能不會生效。 若要深入瞭解 Azure 如何剖析角色指派,請參閱 Azure RBAC 如何判斷使用者是否可以存取資源

  • 有時可能需要一小時的時間,新的角色指派才會對整個堆疊的快取權限生效。

下一步