Skip to content

schema attribute "msi_resource_id" is not supported by code #3697

@dunalduck0

Description

@dunalduck0

Operating System

Linux

Version Information

azure-cli: 2.78.0
azure-cli-core: 2.78.0
azure-cli-telemetry: 1.1.0
extensions:
azure-devops: 1.0.0
ml: 2.39.0

Steps to reproduce

Write a YAML pipeline with the following text

pipeline.yaml

# Use managed identity to run the job
identity:
  type: managed_identity
  msi_resource_id: /subscriptions/xxxxxxxxxx/your-managed-identity

Run az ml job validate --file pipeline.yaml to verify

Expected behavior

Verification should pass

Actual behavior

Verificaiton failed

{
  "errors": [
    {
      "message": "['TypeError: ManagedIdentityConfiguration.__init__() got an unexpected keyword argument \\'msi_resource_id\\'. Did you mean \\'resource_id\\'? from   File \"/opt/az/azcliextensions/ml/azure/ai/ml/_schema/job/identity.py\", line 41, in make     return ManagedIdentityConfiguration(**data)']; {'type': [\"Value 'managed_identity' passed is not in set ['aml_token']\"], 'msi_resource_id': ['Unknown field.']}; {'type': [\"Value 'managed_identity' passed is not in set ['user_identity']\"], 'msi_resource_id': ['Unknown field.']}",
      "path": "identity",
      "value": {
        "msi_resource_id": "/subscriptions/xxxxxxxxxx/your-managed-identity",
        "type": "managed_identity"
      }
    }
  ],
  "result": "Failed"
}

Addition information

Source code shows "msi_resource_id" is not supported.

https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_credentials.py#L512

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions