Coder Social home page Coder Social logo

ImdsCredential.get_token failed: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint. about azure-sdk-for-python HOT 7 OPEN

vanlanchoy avatar vanlanchoy commented on June 10, 2024
ImdsCredential.get_token failed: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint.

from azure-sdk-for-python.

Comments (7)

github-actions avatar github-actions commented on June 10, 2024

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

from azure-sdk-for-python.

pvaneck avatar pvaneck commented on June 10, 2024

Hi, @vanlanchoy. It appears you are using a fairly old version of azure-identity. Is it possible for you to upgrade to the latest with pip install -U azure-identity and then retry?

Also, what Azure hosting environment/service are you running this code on? ManagedIdentityCredential only works in certain Azure hosts with Managed Identity enabled.

from azure-sdk-for-python.

github-actions avatar github-actions commented on June 10, 2024

Hi @vanlanchoy. 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.

from azure-sdk-for-python.

vanlanchoy avatar vanlanchoy commented on June 10, 2024

Hi @pvaneck , I've tried upgraded my Azure.Identity module to 1.16.0 msal-1.28.0, and I'm running my code in Azure Synapse Workspace and still getting the same error. Does the module currently supporting UAMI/SAMI?
image

from azure-sdk-for-python.

pvaneck avatar pvaneck commented on June 10, 2024

Based on the docs here: https://learn.microsoft.com/azure/synapse-analytics/synapse-service-identity#user-assigned-managed-identity, "User-assigned Managed Identity is not currently supported in Synapse notebooks and Spark job definitions.". I'm not sure why this is the case, but this is the likely cause of the UAMI Credential being unable to work. Try using system-assigned MI, and see if you encounter the same problem.

from azure-sdk-for-python.

vanlanchoy avatar vanlanchoy commented on June 10, 2024

I am seeing the same error for SAMI scenario as well.

from azure-sdk-for-python.

pvaneck avatar pvaneck commented on June 10, 2024

Hmm, @xiangyan99 do you know if Managed Identity authentication is supported through our SDKs in Synapse Notebooks? I feel like it might not be as it doesn't seem like the IMDS endpoint is accessible from within the notebook/Spark pool, and we don't do any specific checks for Synapse specific environment variable within ManagedIdentityCredential...

You'd probably have to use service principals (ClientSecretCredential/EnvironmentCredential), or perhaps some of the msspark util functions listed here: https://learn.microsoft.com/azure/synapse-analytics/spark/microsoft-spark-utilities?pivots=programming-language-python

from azure-sdk-for-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.