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.