cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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 ?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.