cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

On-behalf-of token creation for service principals is not enabled for this workspace

Ajay-Pandey
Esteemed Contributor III

Hi All

I just wanted to create PAT for Databricks Service Principle but getting below code while hitting API or using CLI - 

AjayPandey_0-1710845262519.pngAjayPandey_1-1710845276557.png

Please help me to create PAT for the same.

#dataengineering #databricks

5 REPLIES 5

Kaniz
Community Manager
Community Manager

Ajay-Pandey
Esteemed Contributor III

@Kaniz I have already referred this one but still having issue
I have created Service Account in Databricks and I am not using Azure Service Principle

Kaniz
Community Manager
Community Manager

Hi @Ajay-PandeyThe error message you’re encountering indicates that the on-behalf-of token creation feature for service principals is not enabled for your Databricks workspace.

To enable this feature, follow these steps:

  1. Provide CAN_USE Permission:

    • You need to grant the CAN_USE permission to the service principal in the token manage permission.
    • Navigate to Admin > Workspace Settings.
    • Look for the CAN_USE option and provide this permission to your service principal.
  2. Once the feature is enabled, you should be able to use the /api/2.0/token-management/on-behalf-of/to...12. If you encounter any further issues, feel free to reach out for assistance! 

Ajay-Pandey
Esteemed Contributor III

Hi @Kaniz ,

I have given all the permissions (Admin) to Service Principle and still having the same issue.

Please find all the details below - 

AjayPandey_0-1710860431811.png

AjayPandey_1-1710860497811.png

 

 

Ajay-Pandey
Esteemed Contributor III

Hi @Kaniz 
Have you got any update on this ?

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!