Notebook : AccessDeniedException

Wajih Arfaoui 70 Reputation points
2024-10-29T15:28:46.6966667+00:00

Hello,

I am trying to save a delta/parquet file into the ADLS Gen2 using a PySpark Notebook as follows :

delta_output_path = "abfss://container@account.dfs.core.windows.net/clients/"

df_result.write.format("delta").mode("overwrite").save(delta_output_path)  

Eventhough, I granted Azure Blob Data contributor role to the Synapse Workspace and ADF, I am still getting this error : AccessDeniedException: Operation failed: "This request is not authorized to perform this operation using this permission.", 403, HEAD

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,979 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,212 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 16,640 Reputation points Microsoft Vendor
    2024-10-29T16:10:43.49+00:00

    Hi @Wajih Arfaoui
    Welcome to Microsoft Q&A platform and thanks for posting your query here.

    From the permission you have doesn't have Storage Blob Data Contributor: Use to grant read/write/delete permissions to Blob storage resources. To resolve this issue, you need to verify the access permissions for the ADF/synapse and user type:

    Note: Storage Blob Data Contributor: Use to grant read/write/delete permissions to Blob storage resources.

    Synapse permissions: Kindly check the permissions on the Storage account as shown below:

    Synapse-ADLSGen2-Access

    User permissions: Check the user permission on the storage account as shown below:

    Synapse-ADLSGen2-UserAccess

    After granting the permissions - make sure to wait for 10-15 mins to propagate the permissions and then re-try to run the notebook.

    In case, if you are experiencing any issue, please do let us know.

    For more details, refer to Notebook - This request is not authorized to perform this operation. , 403.

    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.


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.