Databricks using Service Principal to access ADLS with 403 error

Gonzalo Melosevich Fernandez 21 Reputation points
2022-11-25T17:08:11.31+00:00

My organization has two Databricks workspaces in the same tenant: workspace A and workspace B.

In workspace A the following code uses Service Principal X and successfully authenticates against Container Y in Storage Account Z

264278-image.png

If I run exactly the same code in workspace B, the following error pops up:

Operation failed: "This request is not authorized to perform this operation.", 403, GET, https://dzot.dfs.core.windows.net/curated?upn=false&resource=filesystem&maxResults=5000&directory=analytics&timeout=90&recursive=false, AuthorizationFailure, "This request is not authorized to perform this operation. RequestId:d354gsd3-2516-708d-3dad-cc3429506000 Time:2022-11-25T16:49:55.9537035Z"

All the answers to similar questions to this one recommend granting Storage Data Blob Contributor to the Service Principal. But in this case the issue is not with the Service Principal. Why can the Service Principal authenticate a connection in Workspace A but not in Workspace B?

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,337 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,913 questions
Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
662 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 76,746 Reputation points Microsoft Employee
    2022-11-29T10:53:05.653+00:00

    Hello @Gonzalo Melosevich Fernandez ,

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

    As per the repro, I'm able to run the same code in multiple workpaces without any issue.

    Workspace One:

    265222-image.png

    Workspace Two:

    265177-image.png

    You may experience this error message due to following reasons:

    Due to passing invalid path or spelling mistakes in the path or due to missing permissions.

    265232-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 jhow you can be part of Q&A Volunteer Moderators
    0 comments No comments

0 additional answers

Sort by: Most helpful