Variable: useServicePrincipal
constuseServicePrincipal: (mode,req?) =>boolean=identity.useServicePrincipal
Whether this request should run its Databricks calls as the app service
principal rather than OBO - "service-principal" always, "user" never, and
"auto" only when the request carries no OBO token for AppKit to use.
Whether req should run its Databricks calls as the app service principal
rather than OBO.
"service-principal"-> alwaystrue."user"-> alwaysfalse, even with no token. The mode is an explicit assertion that every caller is OBO-capable, so a missing token is a real error and must surface as AppKit’sAuthenticationErrorrather than being quietly downgraded to shared data access."auto"->trueonly when the request carries no usable OBO token.
A request AppKit will not accept for OBO anyway (no token) can never be
served by entering asUser, so in "auto" mode the token check is the whole
decision: it is the same condition AppKit itself branches on, just resolved
before it can throw.
Parameters
Section titled “Parameters”IdentityMode
HeaderBearing
Returns
Section titled “Returns”boolean