content of directory cannot be listed

mohammed adeeb 0 Reputation points
2026-07-08T12:54:52.9133333+00:00

how to fix it despite giving it access from iam and networking is correct tooUser's image

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.


2 answers

Sort by: Most helpful
  1. SAI JAGADEESH KUDIPUDI 3,640 Reputation points Microsoft External Staff Moderator
    2026-07-11T04:54:26.37+00:00

    Hi @mohammed adeeb ,

    The error "Content of directory on path cannot be listed" in Azure Synapse Serverless SQL Pool typically indicates that the SQL engine is unable to enumerate the contents of the specified ADLS Gen2 folder.

    Based on the query and screenshot provided, please verify the following:

    Ensure the identity used by Synapse Serverless SQL Pool has the required permissions on the storage account. Assign Storage Blob Data Reader (or Storage Blob Data Contributor) and confirm the necessary ADLS Gen2 ACL permissions (Read (r) and Execute (x)) are applied on the folder hierarchy.

    If SQL Authentication is being used, configure the appropriate server-level credential or database-scoped credential. SQL logins cannot use Microsoft Entra pass-through authentication by default.

    If access is configured through a SAS token, verify that the SAS is valid, not expired, and includes Read and List permissions.

    Validate the storage path and confirm that files exist in the target folder. In the provided query, the path points to a folder:

    BULK 'https://olistdatastorage.dfs.core.windows.net/olistdata/silver/'

    Try querying a specific Parquet file or use an appropriate wildcard pattern, for example:

    SELECT TOP 100 *

    FROM OPENROWSET(

    BULK 'https://olistdatastorage.dfs.core.windows.net/olistdata/silver/*.parquet',

    FORMAT = 'PARQUET'

    ) AS Result1;

    If the storage account firewall is enabled, ensure that the Synapse workspace is allowed to access the storage account.

    In some cases, large Microsoft Entra group memberships can cause token-related access issues. Consider using Managed Identity, Service Principal, or SAS-based authentication if applicable.

    To further narrow down the root cause, please confirm:

    • Whether you are using Microsoft Entra authentication or SQL authentication.
    • Whether the storage account firewall is enabled.
    • The RBAC role assigned to the Synapse Workspace Managed Identity.
    • Whether files are present under the silver folder.
    • Whether querying a specific Parquet file succeeds.

    References

    Please let us know the results of the above checks, and we will be happy to assist further.

    Was this answer helpful?

    0 comments No comments

  2. Alex Burlachenko 24,950 Reputation points MVP Volunteer Moderator
    2026-07-09T07:11:55.46+00:00

    hi mohammed adeeb & thx for sharing urs issue here at Q&A portal,

    error usually means Synapse can reach the storage account, but the identity running the query can’t list that ADLS path. In serverless SQL, OPENROWSET against ADLS needs permission for the identity actually used by the query. Giving IAM to “something” isn’t always the same as giving it to the query identity. Azure loves that little trap.

    Just make sure your signed-in user or the Synapse workspace managed identity if using it, has Storage Blob Data Reader on the storage account/container. Look at ADLS Gen2 ACLs. IAM alone may not be enough. The identity needs execute x permission on parent folders and read/list on the target folder.

    Path looks like /olistdata/silver/

    So verify ACLs on

    /

    /olistdata

    /olistdata/silver

    If files are directly under silver querying with wildcard

    BULK 'https://osltdata...dfs.core.windows.net/olistdata/silver/*.parquet'

    https://learn.microsoft.com/azure/synapse-analytics/sql/develop-storage-files-storage-access-control & https://learn.microsoft.com/azure/storage/blobs/data-lake-storage-access-control would help u. If networking is really correct, this is almost certainly permissions/ACL or wrong identity. The message says directory can’t be listed, not that Parquet is broken.

    rgds,

    Alex

    &

    If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal

    and at my blog https://ctrlaltdel.blog/

    Was this answer helpful?

    0 comments No comments

Your answer

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