Skip to content

lib.DataLakeCredential doesn't work after the latest release 1.0.1 #339

@dylanw-oss

Description

@dylanw-oss

I have been using Managed Identity in the ADLS client, and it worked well until the release of version 1.0.1 on June 3.

Got error message:

adlsCredential = lib.DataLakeCredential(
AttributeError: module 'azure.datalake.store.lib' has no attribute 'DataLakeCredential'

The function I'm using to create ADLS client:

def get_adls_gen1_client(tenant_id: str, client_id: str, store_name: str):
    resource = "https://datalake.azure.net/.default"
    scopes = [resource]
    credential = DefaultAzureCredential(exclude_interactive_browser_credential=False)
    token = credential.get_token(resource)
    adlsCredential = lib.DataLakeCredential(
        {
            "access_token": token.token,
            "access": token.token,
            "expires_in": token.expires_on,
            "token_type": "Bearer",
            "resource": resource,
            "scopes": scopes,
            "refresh": False,
            "time": time.time(),
            "tenant": tenant_id,
            "client_id": client_id,
            "scopes": scopes,
        }
    )
    return core.AzureDLFileSystem(token=adlsCredential, store_name=store_name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions