1. Packages
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. ConnectionDirectorySynchronizedGroups
Viewing docs for Auth0 v3.44.0
published on Sunday, May 24, 2026 by Pulumi
auth0 logo
Viewing docs for Auth0 v3.44.0
published on Sunday, May 24, 2026 by Pulumi

    With this resource, you can manage the set of Google Workspace group IDs synchronized via directory provisioning for an Auth0 connection. (EA only)

    This resource is only available for EA users.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const myConnection = new auth0.Connection("my_connection", {
        name: "My-Google-Workspace-Connection",
        strategy: "google-apps",
        options: {
            clientId: "...",
            clientSecret: "...",
            domain: "example.com",
            tenantDomain: "example.com",
            apiEnableUsers: true,
            apiEnableGroups: true,
        },
    });
    const myDirectory = new auth0.ConnectionDirectory("my_directory", {
        connectionId: myConnection.id,
        synchronizeGroups: "selected",
    });
    const myGroups = new auth0.ConnectionDirectorySynchronizedGroups("my_groups", {
        connectionId: myConnection.id,
        groupIds: [
            "group1abc",
            "group2def",
            "group3ghi",
        ],
    }, {
        dependsOn: [myDirectory],
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_connection = auth0.Connection("my_connection",
        name="My-Google-Workspace-Connection",
        strategy="google-apps",
        options={
            "client_id": "...",
            "client_secret": "...",
            "domain": "example.com",
            "tenant_domain": "example.com",
            "api_enable_users": True,
            "api_enable_groups": True,
        })
    my_directory = auth0.ConnectionDirectory("my_directory",
        connection_id=my_connection.id,
        synchronize_groups="selected")
    my_groups = auth0.ConnectionDirectorySynchronizedGroups("my_groups",
        connection_id=my_connection.id,
        group_ids=[
            "group1abc",
            "group2def",
            "group3ghi",
        ],
        opts = pulumi.ResourceOptions(depends_on=[my_directory]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myConnection, err := auth0.NewConnection(ctx, "my_connection", &auth0.ConnectionArgs{
    			Name:     pulumi.String("My-Google-Workspace-Connection"),
    			Strategy: pulumi.String("google-apps"),
    			Options: &auth0.ConnectionOptionsArgs{
    				ClientId:        pulumi.String("..."),
    				ClientSecret:    pulumi.String("..."),
    				Domain:          pulumi.String("example.com"),
    				TenantDomain:    pulumi.String("example.com"),
    				ApiEnableUsers:  pulumi.Bool(true),
    				ApiEnableGroups: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		myDirectory, err := auth0.NewConnectionDirectory(ctx, "my_directory", &auth0.ConnectionDirectoryArgs{
    			ConnectionId:      myConnection.ID(),
    			SynchronizeGroups: pulumi.String("selected"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = auth0.NewConnectionDirectorySynchronizedGroups(ctx, "my_groups", &auth0.ConnectionDirectorySynchronizedGroupsArgs{
    			ConnectionId: myConnection.ID(),
    			GroupIds: pulumi.StringArray{
    				pulumi.String("group1abc"),
    				pulumi.String("group2def"),
    				pulumi.String("group3ghi"),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			myDirectory,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        var myConnection = new Auth0.Connection("my_connection", new()
        {
            Name = "My-Google-Workspace-Connection",
            Strategy = "google-apps",
            Options = new Auth0.Inputs.ConnectionOptionsArgs
            {
                ClientId = "...",
                ClientSecret = "...",
                Domain = "example.com",
                TenantDomain = "example.com",
                ApiEnableUsers = true,
                ApiEnableGroups = true,
            },
        });
    
        var myDirectory = new Auth0.ConnectionDirectory("my_directory", new()
        {
            ConnectionId = myConnection.Id,
            SynchronizeGroups = "selected",
        });
    
        var myGroups = new Auth0.ConnectionDirectorySynchronizedGroups("my_groups", new()
        {
            ConnectionId = myConnection.Id,
            GroupIds = new[]
            {
                "group1abc",
                "group2def",
                "group3ghi",
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                myDirectory,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.Connection;
    import com.pulumi.auth0.ConnectionArgs;
    import com.pulumi.auth0.inputs.ConnectionOptionsArgs;
    import com.pulumi.auth0.ConnectionDirectory;
    import com.pulumi.auth0.ConnectionDirectoryArgs;
    import com.pulumi.auth0.ConnectionDirectorySynchronizedGroups;
    import com.pulumi.auth0.ConnectionDirectorySynchronizedGroupsArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var myConnection = new Connection("myConnection", ConnectionArgs.builder()
                .name("My-Google-Workspace-Connection")
                .strategy("google-apps")
                .options(ConnectionOptionsArgs.builder()
                    .clientId("...")
                    .clientSecret("...")
                    .domain("example.com")
                    .tenantDomain("example.com")
                    .apiEnableUsers(true)
                    .apiEnableGroups(true)
                    .build())
                .build());
    
            var myDirectory = new ConnectionDirectory("myDirectory", ConnectionDirectoryArgs.builder()
                .connectionId(myConnection.id())
                .synchronizeGroups("selected")
                .build());
    
            var myGroups = new ConnectionDirectorySynchronizedGroups("myGroups", ConnectionDirectorySynchronizedGroupsArgs.builder()
                .connectionId(myConnection.id())
                .groupIds(            
                    "group1abc",
                    "group2def",
                    "group3ghi")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(myDirectory)
                    .build());
    
        }
    }
    
    resources:
      myConnection:
        type: auth0:Connection
        name: my_connection
        properties:
          name: My-Google-Workspace-Connection
          strategy: google-apps
          options:
            clientId: '...'
            clientSecret: '...'
            domain: example.com
            tenantDomain: example.com
            apiEnableUsers: true
            apiEnableGroups: true
      myDirectory:
        type: auth0:ConnectionDirectory
        name: my_directory
        properties:
          connectionId: ${myConnection.id}
          synchronizeGroups: selected
      myGroups:
        type: auth0:ConnectionDirectorySynchronizedGroups
        name: my_groups
        properties:
          connectionId: ${myConnection.id}
          groupIds:
            - group1abc
            - group2def
            - group3ghi
        options:
          dependsOn:
            - ${myDirectory}
    
    pulumi {
      required_providers {
        auth0 = {
          source = "pulumi/auth0"
        }
      }
    }
    
    resource "auth0_connection" "my_connection" {
      name     = "My-Google-Workspace-Connection"
      strategy = "google-apps"
      options = {
        client_id         = "..."
        client_secret     = "..."
        domain            = "example.com"
        tenant_domain     = "example.com"
        api_enable_users  = true
        api_enable_groups = true
      }
    }
    resource "auth0_connectiondirectory" "my_directory" {
      connection_id      = auth0_connection.my_connection.id
      synchronize_groups = "selected"
    }
    resource "auth0_connectiondirectorysynchronizedgroups" "my_groups" {
      depends_on    = [auth0_connectiondirectory.my_directory]
      connection_id = auth0_connection.my_connection.id
      group_ids     = ["group1abc", "group2def", "group3ghi"]
    }
    

    Create ConnectionDirectorySynchronizedGroups Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ConnectionDirectorySynchronizedGroups(name: string, args: ConnectionDirectorySynchronizedGroupsArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectionDirectorySynchronizedGroups(resource_name: str,
                                              args: ConnectionDirectorySynchronizedGroupsArgs,
                                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectionDirectorySynchronizedGroups(resource_name: str,
                                              opts: Optional[ResourceOptions] = None,
                                              connection_id: Optional[str] = None,
                                              group_ids: Optional[Sequence[str]] = None)
    func NewConnectionDirectorySynchronizedGroups(ctx *Context, name string, args ConnectionDirectorySynchronizedGroupsArgs, opts ...ResourceOption) (*ConnectionDirectorySynchronizedGroups, error)
    public ConnectionDirectorySynchronizedGroups(string name, ConnectionDirectorySynchronizedGroupsArgs args, CustomResourceOptions? opts = null)
    public ConnectionDirectorySynchronizedGroups(String name, ConnectionDirectorySynchronizedGroupsArgs args)
    public ConnectionDirectorySynchronizedGroups(String name, ConnectionDirectorySynchronizedGroupsArgs args, CustomResourceOptions options)
    
    type: auth0:ConnectionDirectorySynchronizedGroups
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "auth0_connectiondirectorysynchronizedgroups" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ConnectionDirectorySynchronizedGroupsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectionDirectorySynchronizedGroupsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectionDirectorySynchronizedGroupsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionDirectorySynchronizedGroupsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionDirectorySynchronizedGroupsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var connectionDirectorySynchronizedGroupsResource = new Auth0.ConnectionDirectorySynchronizedGroups("connectionDirectorySynchronizedGroupsResource", new()
    {
        ConnectionId = "string",
        GroupIds = new[]
        {
            "string",
        },
    });
    
    example, err := auth0.NewConnectionDirectorySynchronizedGroups(ctx, "connectionDirectorySynchronizedGroupsResource", &auth0.ConnectionDirectorySynchronizedGroupsArgs{
    	ConnectionId: pulumi.String("string"),
    	GroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "auth0_connectiondirectorysynchronizedgroups" "connectionDirectorySynchronizedGroupsResource" {
      connection_id = "string"
      group_ids     = ["string"]
    }
    
    var connectionDirectorySynchronizedGroupsResource = new ConnectionDirectorySynchronizedGroups("connectionDirectorySynchronizedGroupsResource", ConnectionDirectorySynchronizedGroupsArgs.builder()
        .connectionId("string")
        .groupIds("string")
        .build());
    
    connection_directory_synchronized_groups_resource = auth0.ConnectionDirectorySynchronizedGroups("connectionDirectorySynchronizedGroupsResource",
        connection_id="string",
        group_ids=["string"])
    
    const connectionDirectorySynchronizedGroupsResource = new auth0.ConnectionDirectorySynchronizedGroups("connectionDirectorySynchronizedGroupsResource", {
        connectionId: "string",
        groupIds: ["string"],
    });
    
    type: auth0:ConnectionDirectorySynchronizedGroups
    properties:
        connectionId: string
        groupIds:
            - string
    

    ConnectionDirectorySynchronizedGroups Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ConnectionDirectorySynchronizedGroups resource accepts the following input properties:

    ConnectionId string
    ID of the connection for which to manage synchronized groups. (EA only)
    GroupIds List<string>
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    ConnectionId string
    ID of the connection for which to manage synchronized groups. (EA only)
    GroupIds []string
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connection_id string
    ID of the connection for which to manage synchronized groups. (EA only)
    group_ids list(string)
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connectionId String
    ID of the connection for which to manage synchronized groups. (EA only)
    groupIds List<String>
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connectionId string
    ID of the connection for which to manage synchronized groups. (EA only)
    groupIds string[]
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connection_id str
    ID of the connection for which to manage synchronized groups. (EA only)
    group_ids Sequence[str]
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connectionId String
    ID of the connection for which to manage synchronized groups. (EA only)
    groupIds List<String>
    List of Google Workspace Directory group IDs to synchronize. (EA only)

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConnectionDirectorySynchronizedGroups resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ConnectionDirectorySynchronizedGroups Resource

    Get an existing ConnectionDirectorySynchronizedGroups resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConnectionDirectorySynchronizedGroupsState, opts?: CustomResourceOptions): ConnectionDirectorySynchronizedGroups
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_id: Optional[str] = None,
            group_ids: Optional[Sequence[str]] = None) -> ConnectionDirectorySynchronizedGroups
    func GetConnectionDirectorySynchronizedGroups(ctx *Context, name string, id IDInput, state *ConnectionDirectorySynchronizedGroupsState, opts ...ResourceOption) (*ConnectionDirectorySynchronizedGroups, error)
    public static ConnectionDirectorySynchronizedGroups Get(string name, Input<string> id, ConnectionDirectorySynchronizedGroupsState? state, CustomResourceOptions? opts = null)
    public static ConnectionDirectorySynchronizedGroups get(String name, Output<String> id, ConnectionDirectorySynchronizedGroupsState state, CustomResourceOptions options)
    resources:  _:    type: auth0:ConnectionDirectorySynchronizedGroups    get:      id: ${id}
    import {
      to = auth0_connectiondirectorysynchronizedgroups.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ConnectionId string
    ID of the connection for which to manage synchronized groups. (EA only)
    GroupIds List<string>
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    ConnectionId string
    ID of the connection for which to manage synchronized groups. (EA only)
    GroupIds []string
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connection_id string
    ID of the connection for which to manage synchronized groups. (EA only)
    group_ids list(string)
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connectionId String
    ID of the connection for which to manage synchronized groups. (EA only)
    groupIds List<String>
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connectionId string
    ID of the connection for which to manage synchronized groups. (EA only)
    groupIds string[]
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connection_id str
    ID of the connection for which to manage synchronized groups. (EA only)
    group_ids Sequence[str]
    List of Google Workspace Directory group IDs to synchronize. (EA only)
    connectionId String
    ID of the connection for which to manage synchronized groups. (EA only)
    groupIds List<String>
    List of Google Workspace Directory group IDs to synchronize. (EA only)

    Import

    $ pulumi import auth0:index/connectionDirectorySynchronizedGroups:ConnectionDirectorySynchronizedGroups my_groups "con_XXXXXXXXXXXXXX"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Viewing docs for Auth0 v3.44.0
    published on Sunday, May 24, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial