Federated Identity credentials auth in azure table sdk

SanaCMSFT-8922 301 Reputation points
2024-06-05T10:15:13.1933333+00:00

Hi
I was trying to use FIC creds for table sdk but was getting the following issue:

CredentialUnavailableError: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint.

This is the doc I am following for FIC credential setup(Python code): https://learn.microsoft.com/en-us/identity/microsoft-identity-platform/federated-identity-credentials?branch=main&tabs=python#library-api

And this link as reference to provide credentials to table sdk:

https://learn.microsoft.com/en-us/python/api/overview/azure/data-tables-readme?view=azure-python#getting-started

As FIC is not mentioned in table sdk doc, I am getting the credentials using first doc and the using those credentials using second doc as reference.

And this python code is being used in a synapse notebook.

What could be the reason for this error? Is it that FIC is not supported or something else?

Azure Table Storage
Azure Table Storage
An Azure service that stores structured NoSQL data in the cloud.
171 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,003 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 26,656 Reputation points
    2024-06-07T14:09:57.8+00:00

    This issue is common in environments where IMDS is not available, such as in local development environments or when the managed identity is not properly configured or supported.

    Since FIC might not be directly supported in the Azure Table SDK documentation, you can use the DefaultAzureCredential which supports various authentication methods, including managed identity and Azure AD tokens.

    Check this resource for more information and how to configure your local environment: https://learn.microsoft.com/en-us/azure/developer/python/configure-local-development-environment

    You can see the list of credential types that DefaultAzureCredential() goes through in the Azure docs.

    More links :

    https://learn.microsoft.com/en-us/answers/questions/1682563/managedidentitycredential-authentication-unavailab

    https://stackoverflow.com/questions/78457488/persistent-error-when-accessing-an-azure-ai-video-indexer-api-via-logic-apps


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.