Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ManagedIdentityCredential: Unexpected content type "text/html"" error during AzureMachineLearningFileSystem function call #34936

Closed
Wor0001 opened this issue Mar 26, 2024 · 7 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Wor0001
Copy link

Wor0001 commented Mar 26, 2024

  • Package Name: azureml-fsspec
  • Package Version: 1.1.1
  • Operating System: linux Debian 11
  • Python Version: 3.8.17

Describe the bug
When executing a function of an instance of AzureMachineLearningFileSystem (such as .ls()) that is initialized to point to an AML datastore, DefaultAzureCredential fails when attempting to authenticate with the ManagedIdentityCredential, with the reason "Unexpected content type "text/html"". Screenshot of full error message below.

To Reproduce
Steps to reproduce the behavior:

  1. Initialize a AzureMachineLearningFileSystem object with an AML datastore URI, no other arguments.
  2. Call a function of the filesystem object, such as .ls().

Expected behavior
DefaultAzureCredential attempts to authenticate with ManagedIdentityCredential, fails (because I'm running in VS Code on a local machine), and it continues attempting other authentication methods (eventually landing on CLICredential, which works).

Screenshots
image

Additional context
With this same setup, any time I use DefaultAzureCredential, I have to include the arg "exclude_managed_identity_credential=True", otherwise this same failure with the ManagedIdentityCredential will cause an error. This works for things like MLClient, where one can give it a credential to use when instantiating. To use an MLClient, for example, I could create a DefaultAzureCredential with "exclude_managed_identity_credential=True", then pass that credential into MLClient when initializing it. If I don't do this, I will get the same error when trying to do anything with the MLClient that required authentication. I'm also on USGovCloud.

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 26, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@xiangyan99
Copy link
Member

Thanks for reaching out.

Could you help to clarify the questions?

e.g. you want to know more about the failure "Unexpected content type "text/html"" or you want azureml-fsspec to allow specifying credential object?

@xiangyan99 xiangyan99 added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 26, 2024
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 26, 2024
Copy link

Hi @Wor0001. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@Wor0001
Copy link
Author

Wor0001 commented Mar 26, 2024

Thanks for the quick reply. It would be great if I could tell AzureMachineLearningFileSystem to skip the managed identity credential check, like I can by doing the "exclude_managed_identity_credential=True" arg with DefaultAzureCredential. Or to be able to pass a credential to AzureMachineLearningFileSystem to use specifically. I just want to avoid the error from the managed identity credential check. Is there way to do that?

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Mar 26, 2024
@xiangyan99
Copy link
Member

Thanks for the clarification.

azureml-fsspec package is not monitored in this repo.

Please open a ticket for the machine learning team.

@xiangyan99 xiangyan99 added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Mar 26, 2024
Copy link

Hi @Wor0001. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

Copy link

github-actions bot commented Apr 2, 2024

Hi @Wor0001, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

@github-actions github-actions bot closed this as completed Apr 2, 2024
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Azure Identity SDK Improvements Apr 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Development

No branches or pull requests

2 participants