1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. getWorkspaceIamServicePrincipalsV2
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

    Lists the service principals visible to a workspace, using a workspace-scoped provider.

    Example Usage

    Example usage:

    List all service principals visible to the workspace, using a workspace-scoped provider.

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = databricks.getWorkspaceIamServicePrincipalsV2({});
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_workspace_iam_service_principals_v2()
    
    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.GetWorkspaceIamServicePrincipalsV2(ctx, &databricks.GetWorkspaceIamServicePrincipalsV2Args{}, 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 @this = Databricks.GetWorkspaceIamServicePrincipalsV2.Invoke();
    
    });
    
    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.GetWorkspaceIamServicePrincipalsV2Args;
    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 this = DatabricksFunctions.getWorkspaceIamServicePrincipalsV2(GetWorkspaceIamServicePrincipalsV2Args.builder()
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: databricks:getWorkspaceIamServicePrincipalsV2
          arguments: {}
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    data "databricks_getworkspaceiamserviceprincipalsv2" "this" {
    }
    

    Using getWorkspaceIamServicePrincipalsV2

    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 getWorkspaceIamServicePrincipalsV2(args: GetWorkspaceIamServicePrincipalsV2Args, opts?: InvokeOptions): Promise<GetWorkspaceIamServicePrincipalsV2Result>
    function getWorkspaceIamServicePrincipalsV2Output(args: GetWorkspaceIamServicePrincipalsV2OutputArgs, opts?: InvokeOutputOptions): Output<GetWorkspaceIamServicePrincipalsV2Result>
    def get_workspace_iam_service_principals_v2(filter: Optional[str] = None,
                                                page_size: Optional[int] = None,
                                                provider_config: Optional[GetWorkspaceIamServicePrincipalsV2ProviderConfig] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetWorkspaceIamServicePrincipalsV2Result
    def get_workspace_iam_service_principals_v2_output(filter: pulumi.Input[Optional[str]] = None,
                                                page_size: pulumi.Input[Optional[int]] = None,
                                                provider_config: pulumi.Input[Optional[GetWorkspaceIamServicePrincipalsV2ProviderConfigArgs]] = None,
                                                opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkspaceIamServicePrincipalsV2Result]
    func GetWorkspaceIamServicePrincipalsV2(ctx *Context, args *GetWorkspaceIamServicePrincipalsV2Args, opts ...InvokeOption) (*GetWorkspaceIamServicePrincipalsV2Result, error)
    func GetWorkspaceIamServicePrincipalsV2Output(ctx *Context, args *GetWorkspaceIamServicePrincipalsV2OutputArgs, opts ...InvokeOption) GetWorkspaceIamServicePrincipalsV2ResultOutput

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

    public static class GetWorkspaceIamServicePrincipalsV2 
    {
        public static Task<GetWorkspaceIamServicePrincipalsV2Result> InvokeAsync(GetWorkspaceIamServicePrincipalsV2Args args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceIamServicePrincipalsV2Result> Invoke(GetWorkspaceIamServicePrincipalsV2InvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceIamServicePrincipalsV2Result> Invoke(GetWorkspaceIamServicePrincipalsV2InvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkspaceIamServicePrincipalsV2Result> getWorkspaceIamServicePrincipalsV2(GetWorkspaceIamServicePrincipalsV2Args args, InvokeOptions options)
    public static Output<GetWorkspaceIamServicePrincipalsV2Result> getWorkspaceIamServicePrincipalsV2(GetWorkspaceIamServicePrincipalsV2Args args, InvokeOptions options)
    public static Output<GetWorkspaceIamServicePrincipalsV2Result> getWorkspaceIamServicePrincipalsV2(GetWorkspaceIamServicePrincipalsV2Args args, InvokeOutputOptions options)
    
    fn::invoke:
      function: databricks:index/getWorkspaceIamServicePrincipalsV2:getWorkspaceIamServicePrincipalsV2
      arguments:
        # arguments dictionary
    data "databricks_get_workspace_iam_service_principals_v2" "name" {
        # arguments
    }

    The following arguments are supported:

    Filter string
    Optional. Allows filtering service principals by application id or external id
    PageSize int
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    ProviderConfig GetWorkspaceIamServicePrincipalsV2ProviderConfig
    Configure the provider for management through account provider.
    Filter string
    Optional. Allows filtering service principals by application id or external id
    PageSize int
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    ProviderConfig GetWorkspaceIamServicePrincipalsV2ProviderConfig
    Configure the provider for management through account provider.
    filter string
    Optional. Allows filtering service principals by application id or external id
    page_size number
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    provider_config object
    Configure the provider for management through account provider.
    filter String
    Optional. Allows filtering service principals by application id or external id
    pageSize Integer
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    providerConfig GetWorkspaceIamServicePrincipalsV2ProviderConfig
    Configure the provider for management through account provider.
    filter string
    Optional. Allows filtering service principals by application id or external id
    pageSize number
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    providerConfig GetWorkspaceIamServicePrincipalsV2ProviderConfig
    Configure the provider for management through account provider.
    filter str
    Optional. Allows filtering service principals by application id or external id
    page_size int
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    provider_config GetWorkspaceIamServicePrincipalsV2ProviderConfig
    Configure the provider for management through account provider.
    filter String
    Optional. Allows filtering service principals by application id or external id
    pageSize Number
    The maximum number of SPs to return. The service may return fewer than this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000
    providerConfig Property Map
    Configure the provider for management through account provider.

    getWorkspaceIamServicePrincipalsV2 Result

    The following output properties are available:

    Supporting Types

    GetWorkspaceIamServicePrincipalsV2ProviderConfig

    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.

    GetWorkspaceIamServicePrincipalsV2ServicePrincipal

    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    AccountSpStatus string
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    DisplayName string
    (string) - Display name of the service principal
    ExternalId string
    (string) - ExternalId of the service principal in the customer's IdP
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    ProviderConfig GetWorkspaceIamServicePrincipalsV2ServicePrincipalProviderConfig
    Configure the provider for management through account provider.
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    AccountSpStatus string
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    DisplayName string
    (string) - Display name of the service principal
    ExternalId string
    (string) - ExternalId of the service principal in the customer's IdP
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    ProviderConfig GetWorkspaceIamServicePrincipalsV2ServicePrincipalProviderConfig
    Configure the provider for management through account provider.
    account_id string
    (string) - The parent account ID for the service principal in Databricks
    account_sp_status string
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    application_id string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    display_name string
    (string) - Display name of the service principal
    external_id string
    (string) - ExternalId of the service principal in the customer's IdP
    service_principal_id string
    (string) - Internal service principal ID of the service principal in Databricks
    provider_config object
    Configure the provider for management through account provider.
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus String
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName String
    (string) - Display name of the service principal
    externalId String
    (string) - ExternalId of the service principal in the customer's IdP
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks
    providerConfig GetWorkspaceIamServicePrincipalsV2ServicePrincipalProviderConfig
    Configure the provider for management through account provider.
    accountId string
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus string
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName string
    (string) - Display name of the service principal
    externalId string
    (string) - ExternalId of the service principal in the customer's IdP
    servicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    providerConfig GetWorkspaceIamServicePrincipalsV2ServicePrincipalProviderConfig
    Configure the provider for management through account provider.
    account_id str
    (string) - The parent account ID for the service principal in Databricks
    account_sp_status str
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    application_id str
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    display_name str
    (string) - Display name of the service principal
    external_id str
    (string) - ExternalId of the service principal in the customer's IdP
    service_principal_id str
    (string) - Internal service principal ID of the service principal in Databricks
    provider_config GetWorkspaceIamServicePrincipalsV2ServicePrincipalProviderConfig
    Configure the provider for management through account provider.
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus String
    (string) - The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName String
    (string) - Display name of the service principal
    externalId String
    (string) - ExternalId of the service principal in the customer's IdP
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks
    providerConfig Property Map
    Configure the provider for management through account provider.

    GetWorkspaceIamServicePrincipalsV2ServicePrincipalProviderConfig

    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