spark pool notebook error

arkiboys 9,386 Reputation points
2021-12-01T20:21:37.68+00:00

Hello,
Do you know the solution?

Error :

java.nio.file.AccessDeniedException: Operation failed: "This request is not authorized to perform this operation.", 403

Notebook:

%%pyspark
df = spark.read.load('abfss://container@storagegen2name.dfs.core.windows.net/foldername/filename.csv', format='csv'
## If header exists uncomment line below
##, header=True
    )
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,112 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 73,651 Reputation points Microsoft Employee
    2021-12-02T04:42:46.4+00:00

    Hello @arkiboys ,

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

    To resolve this issue, you need to verify that the Storage Blob Data Contributor role is assigned to user, who is accessing the file from ADLS gen2 account.

    The below steps explains in details on how it works:

    Step1: Ran the same query in the Notebooks, gave me same error message as shown above:

    154352-image.png

    Step2: Checked the permissions on the Storage account permission and found Storage Blob Data Contributor role is not assigned to user.

    154219-image.png

    Step3: Grant Storage Blob Data Contributor role is assigned to user.

    Access Control (IAM) => + Add => Add role assignment => select Storage Blob Data Contributor role => Select User => Review and assign

    154220-image.png

    Step4: Verify that the Storage Blob Data Contributor role is assigned to user.

    154361-image.png

    **Step5: ** Re-run the notebooks

    Note: Wait for 10-15 mins to reflect the RBAC - Storage Blob Data Contributor permissions.

    154256-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful