Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Why Getheaders reconect in case of a token #170

Open
DeLeneMirouze opened this issue May 11, 2021 · 2 comments
Open

Why Getheaders reconect in case of a token #170

DeLeneMirouze opened this issue May 11, 2021 · 2 comments

Comments

@DeLeneMirouze
Copy link
Contributor

In GetHeaders. Are you sure about this?

if ($BearerToken -and $Region){
      Connect-Databricks -BearerToken $BearerToken -Region $Region | Out-Null
  }
  elseif ((DatabricksTokenState) -ne "Valid"){
      Throw "You are not connected - please execute Connect-Databricks"
  }

Why reconnect if we have a token?

@JLLudovico
Copy link

When I connect to databricks using "-UseAzContext" and then call the command "Invoke-DatabricksAPI" I got the Throw from this IF statement.

Is this correct?

@simondmorias
Copy link
Member

There is an issue with it thinking the token is expired. I'm looking into solving.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants