Skip to content

Unsupported auth type AccountManagedIdentity when uploading dataset #46235

@TaylorTheDeveloper

Description

@TaylorTheDeveloper
  • Package Name: azure-ai-projects
  • Package Version: 2.0.1
  • Operating System: Windows 11
  • Python Version: 3.13.7

Describe the bug

Calling project_client.datasets.upload_file() on an AI Services-backed AI Foundry project (new CognitiveServices/accounts model, not the legacy MachineLearningServices/workspaces model) fails with a 400 BadRequest error:

Unsupported auth type AccountManagedIdentity

The error originates from the asset store backend at:

POST https://eastus2.api.azureml.ms/assetstore/v1.0/temporaryDataReference/createOrGet

The AI Foundry hub is configured with:

  • Identity type: UserAssigned managed identity
  • systemDatastoresAuthMode: "Identity"

This is not limited to the SDK — the same error also occurs when attempting to upload a dataset through the Azure AI Foundry portal UI, confirming this is a backend/platform-level issue rather than an SDK bug.

To Reproduce

  1. Deploy an AI Services-backed AI Foundry hub (Microsoft.MachineLearningServices/workspaces, kind: "Hub") with:
    • UserAssigned managed identity
    • systemDatastoresAuthMode = "Identity"
  2. Deploy an AI Foundry project under the hub
  3. Download the sample data set from the eval portal
  4. Run the following Python script:
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential

project_client = AIProjectClient(
    endpoint="https://<ai-services-name>.services.ai.azure.com/api/projects/<project-name>",
    credential=DefaultAzureCredential(),
)

dataset = project_client.datasets.upload_file(
    name="my_dataset",
    version="1",
    file_path="./sample.jsonl",
)
  1. Observe the error:
azure.core.exceptions.HttpResponseError: (ServiceError) Received 400 from a service request
Code: ServiceError
Message: Received 400 from a service request
Target: POST https://eastus2.api.azureml.ms/assetstore/v1.0/temporaryDataReference/createOrGet

(BadRequest) "Unsupported auth type AccountManagedIdentity"

6.. Attempt the same upload via the Azure AI Foundry portal UI → same error.

Expected behavior

datasets.upload_file() should succeed when the hub is configured with systemDatastoresAuthMode = "Identity" and a UserAssigned managed identity. The asset store's temporaryDataReference/createOrGet endpoint should support the AccountManagedIdentity auth type for AI Services-backed projects.

Screenshots
UI Error (same as python sdk error)

Image

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

AI ProjectsService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions