Encountering “Oauth is not supported” error while deploying Terraform

Check the Terraform script and remove any alias from the provider configuration.

Written by vidya.sagamreddy

Last published at: October 15th, 2025

Problem

When you attempt to create a Delta Share programmatically using Terraform, you encounter the following error.

`Error: cannot create share: failed during request visitor: default auth: oauth-m2m: oidc: databricks OAuth is not supported for this host. Config: account_id=<account-id>`

 

Cause

In the Terraform configuration, a single provider has an alias specified. The following code provides an example.

   provider "databricks" {
     alias = "single_provider_alias"
     // other configurations
   }

 

When there's only one provider, Terraform does not require an alias to be specified for the provider. If an alias is provided, it can lead to confusion regarding which host the code should be executed against, resulting in the observed error.

 

Solution

1. Check your Terraform scripts for the Databricks provider configuration. Look for any alias specified for the provider.

2. If you have a single Databricks provider in your Terraform module, remove the alias from the provider configuration. The following code provides an example of the modification.

   provider "databricks" {
     // other configurations
   }

3. Ensure that any resource blocks referencing the aliased provider are updated to use the non-aliased provider.