Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Issue with databricks_provider resource when using a Guest user from another tenant: iss claim #4262

Open
ralphkootker opened this issue Nov 21, 2024 · 0 comments

Comments

@ralphkootker
Copy link

When working with Azure Databricks, it's often the case people are invited as Guest users and as a Guest perform work on somebody else's Azure Account.

In this case, we work with the following provider and auth via the azure-cli.
Executing user belong to ORG A but the implementation takes place on Azure account of ORG B. Both make use of EntraID and the User from ORG A is added as a Guest to ORG B

Configuration

provider "databricks" {
  alias      = "accounts" 
  host       = "https://accounts.azuredatabricks.net"
  account_id    = "xxxxx-xxxxx-xxxx"
  auth_type  = "azure-cli" 
}

Error

The error thrown is:

Error: cannot create metastore assignment: io.jsonwebtoken.IncorrectClaimException: Expected iss claim to be:
https://sts.windows.net/tenant_id_of_orgB/, but was: https://sts.windows.net/tenant_id_of_orgA/
17:16:58.279 STDERR terraform: │ with databricks_metastore_assignment.this,
17:16:58.280 STDERR terraform: │ on adb_workspace.tf line 121, in resource "databricks_metastore_assignment" "this":

Workaround

I ended up setting the azure_tenant_id in the provider as the tenant wasn't wasn't taken over when running az login --tenant xxxxx

provider "databricks" {
  alias      = "accounts" 
  host       = "https://accounts.azuredatabricks.net"
  account_id    = "xxxxx-xxxxx-xxxx"
  auth_type  = "azure-cli" 
  azure_tenant_id    = "xxxxx-xxxxx-xxxx"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant