1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. getWorkspaceIamExternalGroupV2
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi
databricks logo databricks logo
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi

    Public Beta

    API Documentation

    Retrieves an external group — a group that can be synced from your identity provider (IdP) — with the given external ID from the customer’s IdP, scoped to a workspace. If the group does not exist in the account, it will be created. If the customer is not onboarded onto Automatic Identity Management (AIM), this returns an error.

    The name uses the format external-groups/{external_group_id}, where externalGroupId is the group’s object ID in the IdP (for example, a Microsoft Entra ID object ID).

    Note Reading this data source has a side effect: it resolves the group against the IdP and provisions the group in the account if it does not already exist. Provisioning happens at the account level; it does not assign the group to the workspace.

    Note This data source can be used with an account-level or workspace-level provider. With an account-level provider, a workspaceId is required — set it in the providerConfig block (or via the provider’s workspaceId attribute). With a workspace-level provider, workspaceId is optional and defaults to the provider’s workspace.

    Example Usage

    Referring to an external group within a workspace, using an account-level provider with the target workspace selected via providerConfig:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const example = databricks.getWorkspaceIamExternalGroupV2({
        name: "external-groups/11111111-2222-3333-4444-555555555555",
        providerConfig: {
            workspaceId: "1234567890123456",
        },
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    example = databricks.get_workspace_iam_external_group_v2(name="external-groups/11111111-2222-3333-4444-555555555555",
        provider_config={
            "workspace_id": "1234567890123456",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.GetWorkspaceIamExternalGroupV2(ctx, &databricks.GetWorkspaceIamExternalGroupV2Args{
    			Name: "external-groups/11111111-2222-3333-4444-555555555555",
    			ProviderConfig: databricks.GetWorkspaceIamExternalGroupV2ProviderConfig{
    				WorkspaceId: "1234567890123456",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Databricks.GetWorkspaceIamExternalGroupV2.Invoke(new()
        {
            Name = "external-groups/11111111-2222-3333-4444-555555555555",
            ProviderConfig = new Databricks.Inputs.GetWorkspaceIamExternalGroupV2ProviderConfigInputArgs
            {
                WorkspaceId = "1234567890123456",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabricksFunctions;
    import com.pulumi.databricks.inputs.GetWorkspaceIamExternalGroupV2Args;
    import com.pulumi.databricks.inputs.GetWorkspaceIamExternalGroupV2ProviderConfigArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = DatabricksFunctions.getWorkspaceIamExternalGroupV2(GetWorkspaceIamExternalGroupV2Args.builder()
                .name("external-groups/11111111-2222-3333-4444-555555555555")
                .providerConfig(GetWorkspaceIamExternalGroupV2ProviderConfigArgs.builder()
                    .workspaceId("1234567890123456")
                    .build())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: databricks:getWorkspaceIamExternalGroupV2
          arguments:
            name: external-groups/11111111-2222-3333-4444-555555555555
            providerConfig:
              workspaceId: '1234567890123456'
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    data "databricks_getworkspaceiamexternalgroupv2" "example" {
      name = "external-groups/11111111-2222-3333-4444-555555555555"
      provider_config = {
        workspace_id = "1234567890123456"
      }
    }
    

    Using getWorkspaceIamExternalGroupV2

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getWorkspaceIamExternalGroupV2(args: GetWorkspaceIamExternalGroupV2Args, opts?: InvokeOptions): Promise<GetWorkspaceIamExternalGroupV2Result>
    function getWorkspaceIamExternalGroupV2Output(args: GetWorkspaceIamExternalGroupV2OutputArgs, opts?: InvokeOutputOptions): Output<GetWorkspaceIamExternalGroupV2Result>
    def get_workspace_iam_external_group_v2(name: Optional[str] = None,
                                            provider_config: Optional[GetWorkspaceIamExternalGroupV2ProviderConfig] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetWorkspaceIamExternalGroupV2Result
    def get_workspace_iam_external_group_v2_output(name: pulumi.Input[Optional[str]] = None,
                                            provider_config: pulumi.Input[Optional[GetWorkspaceIamExternalGroupV2ProviderConfigArgs]] = None,
                                            opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkspaceIamExternalGroupV2Result]
    func GetWorkspaceIamExternalGroupV2(ctx *Context, args *GetWorkspaceIamExternalGroupV2Args, opts ...InvokeOption) (*GetWorkspaceIamExternalGroupV2Result, error)
    func GetWorkspaceIamExternalGroupV2Output(ctx *Context, args *GetWorkspaceIamExternalGroupV2OutputArgs, opts ...InvokeOption) GetWorkspaceIamExternalGroupV2ResultOutput

    > Note: This function is named GetWorkspaceIamExternalGroupV2 in the Go SDK.

    public static class GetWorkspaceIamExternalGroupV2 
    {
        public static Task<GetWorkspaceIamExternalGroupV2Result> InvokeAsync(GetWorkspaceIamExternalGroupV2Args args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceIamExternalGroupV2Result> Invoke(GetWorkspaceIamExternalGroupV2InvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceIamExternalGroupV2Result> Invoke(GetWorkspaceIamExternalGroupV2InvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkspaceIamExternalGroupV2Result> getWorkspaceIamExternalGroupV2(GetWorkspaceIamExternalGroupV2Args args, InvokeOptions options)
    public static Output<GetWorkspaceIamExternalGroupV2Result> getWorkspaceIamExternalGroupV2(GetWorkspaceIamExternalGroupV2Args args, InvokeOptions options)
    public static Output<GetWorkspaceIamExternalGroupV2Result> getWorkspaceIamExternalGroupV2(GetWorkspaceIamExternalGroupV2Args args, InvokeOutputOptions options)
    
    fn::invoke:
      function: databricks:index/getWorkspaceIamExternalGroupV2:getWorkspaceIamExternalGroupV2
      arguments:
        # arguments dictionary
    data "databricks_get_workspace_iam_external_group_v2" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    ProviderConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    Configure the provider for management through account provider.
    Name string
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    ProviderConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    Configure the provider for management through account provider.
    name string
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    provider_config object
    Configure the provider for management through account provider.
    name String
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    providerConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    Configure the provider for management through account provider.
    name string
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    providerConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    Configure the provider for management through account provider.
    name str
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    provider_config GetWorkspaceIamExternalGroupV2ProviderConfig
    Configure the provider for management through account provider.
    name String
    The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    providerConfig Property Map
    Configure the provider for management through account provider.

    getWorkspaceIamExternalGroupV2 Result

    The following output properties are available:

    AccountId string
    (string) - The parent account ID, from Databricks
    DisplayName string
    (string) - Display name of the group from the customer's IdP
    ExternalGroupId string
    (string) - The external ID of the group in the customer's IdP
    InternalId string
    (string) - Internal groupId of the group in Databricks
    Name string
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    ProviderConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    AccountId string
    (string) - The parent account ID, from Databricks
    DisplayName string
    (string) - Display name of the group from the customer's IdP
    ExternalGroupId string
    (string) - The external ID of the group in the customer's IdP
    InternalId string
    (string) - Internal groupId of the group in Databricks
    Name string
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    ProviderConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    account_id string
    (string) - The parent account ID, from Databricks
    display_name string
    (string) - Display name of the group from the customer's IdP
    external_group_id string
    (string) - The external ID of the group in the customer's IdP
    internal_id string
    (string) - Internal groupId of the group in Databricks
    name string
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    provider_config object
    accountId String
    (string) - The parent account ID, from Databricks
    displayName String
    (string) - Display name of the group from the customer's IdP
    externalGroupId String
    (string) - The external ID of the group in the customer's IdP
    internalId String
    (string) - Internal groupId of the group in Databricks
    name String
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    providerConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    accountId string
    (string) - The parent account ID, from Databricks
    displayName string
    (string) - Display name of the group from the customer's IdP
    externalGroupId string
    (string) - The external ID of the group in the customer's IdP
    internalId string
    (string) - Internal groupId of the group in Databricks
    name string
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    providerConfig GetWorkspaceIamExternalGroupV2ProviderConfig
    account_id str
    (string) - The parent account ID, from Databricks
    display_name str
    (string) - Display name of the group from the customer's IdP
    external_group_id str
    (string) - The external ID of the group in the customer's IdP
    internal_id str
    (string) - Internal groupId of the group in Databricks
    name str
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    provider_config GetWorkspaceIamExternalGroupV2ProviderConfig
    accountId String
    (string) - The parent account ID, from Databricks
    displayName String
    (string) - Display name of the group from the customer's IdP
    externalGroupId String
    (string) - The external ID of the group in the customer's IdP
    internalId String
    (string) - Internal groupId of the group in Databricks
    name String
    (string) - The resource name of the external group. The format depends on the API that returned it:

    • Account-scoped: accounts/{account_id}/external-groups/{external_group_id}
    • Workspace-scoped: external-groups/{external_group_id}
    providerConfig Property Map

    Supporting Types

    GetWorkspaceIamExternalGroupV2ProviderConfig

    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id str
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo databricks logo
    Viewing docs for Databricks v1.109.0
    published on Tuesday, Sep 8, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial