Not able to run databricks notebook using Databricks API, getting permission issue.

Abhishek Singh 46 Reputation points
2024-08-16T12:56:21.25+00:00

I’m trying to run a notebook using the Databricks Azure REST API. I’ve granted my Service Principal (SPN) "Can Manage" permissions for REPOS, clusters, and the workspace. Despite this, I’m still encountering an error when using Postman:

{
    "error_code": "PERMISSION_DENIED",
    "message": "User "my-spn" does not have Manage Run or Owner or Admin permissions on job 246372968680205"
}
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,527 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2024-08-20T21:47:13.54+00:00

    Hi Abhishek Singh,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer

    Error Message:

    "error_code": "PERMISSION_DENIED",
      "message": "User "my-spn" does not have Manage Run or Owner or Admin permissions on job 246372968680205"
    

    Issue:

    • unable to run databricks notebook using Databricks API, getting permission error.

    Solution:

    The problem was related to the task type in the API call. The error occurred because a Python file was being executed as a notebook. This was resolved by changing the task type to spark_python_task and specifying the correct path to the Python file.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

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.