External table 'dbo.V1' is not accessible because content of directory cannot be listed.

Raghul Kannan 106 Reputation points
2023-03-23T06:44:57.5966667+00:00

Hi,

I get the error "External table 'dbo.V1' is not accessible because content of directory cannot be listed". My managed identity has "storage data contributor" role on the specified storage account. Only Azure AD accounts with "storage data contributor" are able to run the query. Not able to run the same query with "Managed Identity"

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.
4,369 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 77,081 Reputation points Microsoft Employee
    2023-03-24T04:54:10.64+00:00


    Raghul Kannan
    - Thanks for the question and using MS Q&A platform.

    Azure Synapse managed identity needs the Storage Blob Data Contributor role on this storage account.

    The error "External table 'dbo.V1' is not accessible because content of directory cannot be listed" occurs when the managed identity does not have the necessary permissions to list the contents of the directory where the external table is located.

    To resolve this issue, you can grant the managed identity the "Storage Blob Data Reader" role on the container that contains the external table. This role allows the managed identity to list the contents of the container and access the external table.

    You can also try granting the managed identity the "Storage Blob Data Contributor" role on the container that contains the external table. This role includes the "Storage Blob Data Reader" role and also allows the managed identity to upload, modify, and delete blobs in the container.

    After granting the necessary permissions, you can try running the query again with the managed identity.

    For more details, refer to the below links:
    Grant permissions to workspace managed identity
    Use external tables with Synapse SQL

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.