Open cecheta opened 2 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
@cecheta thanks for your issue, the team will take a look and get back to you as soon as possible.
I'm experiencing the same issue when trying to read a datastore or data asset using azureml-fsspec / mltable from my local machine.
I'm using the code snippets Azure ML Studio provides; for reading a datastore:
import pandas as pd
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
ml_client = MLClient.from_config(credential=DefaultAzureCredential())
uri = "azureml://subscriptions/<my_sub_id>/resourcegroups/<my_rg>/workspaces/<my_aml_ws>/datastores/my-datastore/paths/my-dir/some_data.csv"
df = pd.read_csv(uri)
df
and for reading a data asset:
import mltable
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
ml_client = MLClient.from_config(credential=DefaultAzureCredential())
data_asset = ml_client.data.get("my-asset", version="1")
path = {
'folder': data_asset.path
}
tbl = mltable.from_delimited_files(paths=[path])
df = tbl.to_pandas_dataframe()
df
The only difference is that I'm not creating my MLClient via from_config but rather by loading in and passing env vars. I don't believe this is the problem since using the same MLClient object to create a datastore or data asset, or to submit a job works without issue. Authentication is still using DefaultAzureCredential, which correctly uses my az login token.
In either case browser-based authentication is triggered when the read is attempted. If I comply the read executes as expected. If I decline it fails as @cecheta notes above. So it does not seem to be respecting my az login token.
I'm getting the same error. Any updates on this issue @kristapratico ?
@azureml-github @FeiDeng friendly ping on this issue
I'd just like to pile on - I'm seeing the same behavior - except now when the browser prompt comes up, even if I accept, I get "StreamError(PermissionDenied(Some(The authentication information was not provided in the correct format. Verify the value of Authorization header.)))" when trying to do pd.read_csv(AZUREMLDATASTOREURI)
Describe the bug When trying to access a data asset using Microsoft Entra authentication,
AzureMachineLearningFileSystem
is unable to authenticate when running locally.To Reproduce Steps to reproduce the behavior:
workspaceblobstore
datastorepip install azureml-fsspec azure-ai-ml
<DATASTORE_URI>
Expected behavior The contents of the datastore should be printed.
Actual behaviour A browser window is launched, prompting the user to log in. This happens twice, then the following error occurs:
Additional context If you create a compute instance and launch VS Code within the compute instance, the script works in that environment, using the compute's managed identity.