This look like chatgpt answer. You are answering my question with a totally different answer which is not related anyhow with what I asked.

 

First I am creating 

ServicePrincipal

programmaticly using the databricks java sdk and once I create the ServicePrincipal I want to create a token for this hanc the error. Based on your first answer I assumed there is a way to give  this ServicePrincipal permission to create token by calling an API but in the api call you shared you aren't sending the applicationId on name on the request henc my question and with the second answer you are telling me how to do that on the UI which I don't want to.

Now my question again can I give permission  to a Service Principals to create have token using java SDK or the http api?