โ09-16-2025 07:28 AM
โ09-16-2025 07:53 AM
@SรธrenBrandt2 Here are few quick checks you can do and rerun.
1. Please make sure the Service Principle running the terraform code have Group Manager role on the specific account group. With that role, it can read that group at the account and retrieve the principal_id without being a full Account Admin. Databricksโ identity docs confirm โgroup managers can manage group membershipโ and that workspace admins can add groups to the account in identityโfederated setups; but the leastโprivilege โGroup Managerโ just for the required groups is often acceptable in regulated environments.
2. Verify the group exists at the account first (AIM). With Automatic identity management enabled, Entra ID users/SPNs/groups are visible at the account and are marked External; theyโre synced from Entra ID. Donโt rely on externalId for automationโDatabricks warns it can change; prefer the stable Databricks id (principal_id).
3. Use the account provider only to resolve principal IDs, then perform the workspace assignment with the workspace provider.
provider "databricks" {
alias = "account"
host = "https://accounts.azuredatabricks.net"
# Azure Databricks Account Console ID is constant:
account_id = ""
# authenticate with a principal that can read the group at the account
}
# --- Workspace-scope provider (this is how you authenticate today) ---
provider "databricks" {
alias = "workspace"
host = var.workspace_url
}
โ09-16-2025 08:25 AM
Hi Nayan,
Thank you for your response!
Your first point "Please make sure the Service Principle running the terraform code have Group Manager role on the specific account group" actually nails my challenge, although I did not spell this out in my question.
So far, to make it work, I have been doing as follows:
So what I am looking for is really a way to do steps 1a-c without having to bother a Databricks account admin.
Is that possible at the moment, I wonder?
โ09-17-2025 07:14 AM - edited โ09-17-2025 07:15 AM
I tried this at my end. It seems currently to add any groups from accounts from workspace the SPN requires account admin permissions. If you don't want to provide a common SPN that is running terraform code as account admin. I would rather isolate my code in two pipelines. One creating a Super Admin SPN that is account admin and using that SPN to add account groups to workspaces. Another SPN having as workspace admin and performing workspace related tasks like creating catalogs, cluster and assigning permissions.
Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now