1. Packages
  2. Twingate
  3. API Docs
  4. getTwingateUsers
Twingate v3.0.17 published on Wednesday, Apr 9, 2025 by Twingate

twingate.getTwingateUsers

Explore with Pulumi AI

Twingate v3.0.17 published on Wednesday, Apr 9, 2025 by Twingate

Users in Twingate can be given access to Twingate Resources and may either be added manually or automatically synchronized with a 3rd party identity provider. For more information, see Twingate’s documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as twingate from "@pulumi/twingate";

const all = twingate.getTwingateUsers({});
Copy
import pulumi
import pulumi_twingate as twingate

all = twingate.get_twingate_users()
Copy
package main

import (
	"github.com/Twingate/pulumi-twingate/sdk/v3/go/twingate"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := twingate.GetTwingateUsers(ctx, &twingate.GetTwingateUsersArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Twingate = Pulumi.Twingate;

return await Deployment.RunAsync(() => 
{
    var all = Twingate.GetTwingateUsers.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.twingate.TwingateFunctions;
import com.pulumi.twingate.inputs.GetTwingateUsersArgs;
import java.util.List;
import java.util.ArrayList;
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 all = TwingateFunctions.getTwingateUsers(GetTwingateUsersArgs.builder()
            .build());

    }
}
Copy
variables:
  all:
    fn::invoke:
      function: twingate:getTwingateUsers
      arguments: {}
Copy

Using getTwingateUsers

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 getTwingateUsers(args: GetTwingateUsersArgs, opts?: InvokeOptions): Promise<GetTwingateUsersResult>
function getTwingateUsersOutput(args: GetTwingateUsersOutputArgs, opts?: InvokeOptions): Output<GetTwingateUsersResult>
Copy
def get_twingate_users(email: Optional[str] = None,
                       email_contains: Optional[str] = None,
                       email_exclude: Optional[str] = None,
                       email_prefix: Optional[str] = None,
                       email_regexp: Optional[str] = None,
                       email_suffix: Optional[str] = None,
                       first_name: Optional[str] = None,
                       first_name_contains: Optional[str] = None,
                       first_name_exclude: Optional[str] = None,
                       first_name_prefix: Optional[str] = None,
                       first_name_regexp: Optional[str] = None,
                       first_name_suffix: Optional[str] = None,
                       last_name: Optional[str] = None,
                       last_name_contains: Optional[str] = None,
                       last_name_exclude: Optional[str] = None,
                       last_name_prefix: Optional[str] = None,
                       last_name_regexp: Optional[str] = None,
                       last_name_suffix: Optional[str] = None,
                       roles: Optional[Sequence[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetTwingateUsersResult
def get_twingate_users_output(email: Optional[pulumi.Input[str]] = None,
                       email_contains: Optional[pulumi.Input[str]] = None,
                       email_exclude: Optional[pulumi.Input[str]] = None,
                       email_prefix: Optional[pulumi.Input[str]] = None,
                       email_regexp: Optional[pulumi.Input[str]] = None,
                       email_suffix: Optional[pulumi.Input[str]] = None,
                       first_name: Optional[pulumi.Input[str]] = None,
                       first_name_contains: Optional[pulumi.Input[str]] = None,
                       first_name_exclude: Optional[pulumi.Input[str]] = None,
                       first_name_prefix: Optional[pulumi.Input[str]] = None,
                       first_name_regexp: Optional[pulumi.Input[str]] = None,
                       first_name_suffix: Optional[pulumi.Input[str]] = None,
                       last_name: Optional[pulumi.Input[str]] = None,
                       last_name_contains: Optional[pulumi.Input[str]] = None,
                       last_name_exclude: Optional[pulumi.Input[str]] = None,
                       last_name_prefix: Optional[pulumi.Input[str]] = None,
                       last_name_regexp: Optional[pulumi.Input[str]] = None,
                       last_name_suffix: Optional[pulumi.Input[str]] = None,
                       roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetTwingateUsersResult]
Copy
func GetTwingateUsers(ctx *Context, args *GetTwingateUsersArgs, opts ...InvokeOption) (*GetTwingateUsersResult, error)
func GetTwingateUsersOutput(ctx *Context, args *GetTwingateUsersOutputArgs, opts ...InvokeOption) GetTwingateUsersResultOutput
Copy

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

public static class GetTwingateUsers 
{
    public static Task<GetTwingateUsersResult> InvokeAsync(GetTwingateUsersArgs args, InvokeOptions? opts = null)
    public static Output<GetTwingateUsersResult> Invoke(GetTwingateUsersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTwingateUsersResult> getTwingateUsers(GetTwingateUsersArgs args, InvokeOptions options)
public static Output<GetTwingateUsersResult> getTwingateUsers(GetTwingateUsersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: twingate:index/getTwingateUsers:getTwingateUsers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Email string
Returns only users that exactly match this email.
EmailContains string
Match when the value exist in the email of the user.
EmailExclude string
Match when the value does not exist in the email of the user.
EmailPrefix string
The email of the user must start with the value.
EmailRegexp string
The regular expression match of the email of the user.
EmailSuffix string
The email of the user must end with the value.
FirstName string
Returns only users that exactly match the first name.
FirstNameContains string
Match when the value exist in the first name of the user.
FirstNameExclude string
Match when the value does not exist in the first name of the user.
FirstNamePrefix string
The first name of the user must start with the value.
FirstNameRegexp string
The regular expression match of the first name of the user.
FirstNameSuffix string
The first name of the user must end with the value.
LastName string
Returns only users that exactly match the last name.
LastNameContains string
Match when the value exist in the last name of the user.
LastNameExclude string
Match when the value does not exist in the last name of the user.
LastNamePrefix string
The last name of the user must start with the value.
LastNameRegexp string
The regular expression match of the last name of the user.
LastNameSuffix string
The last name of the user must end with the value.
Roles List<string>
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
Email string
Returns only users that exactly match this email.
EmailContains string
Match when the value exist in the email of the user.
EmailExclude string
Match when the value does not exist in the email of the user.
EmailPrefix string
The email of the user must start with the value.
EmailRegexp string
The regular expression match of the email of the user.
EmailSuffix string
The email of the user must end with the value.
FirstName string
Returns only users that exactly match the first name.
FirstNameContains string
Match when the value exist in the first name of the user.
FirstNameExclude string
Match when the value does not exist in the first name of the user.
FirstNamePrefix string
The first name of the user must start with the value.
FirstNameRegexp string
The regular expression match of the first name of the user.
FirstNameSuffix string
The first name of the user must end with the value.
LastName string
Returns only users that exactly match the last name.
LastNameContains string
Match when the value exist in the last name of the user.
LastNameExclude string
Match when the value does not exist in the last name of the user.
LastNamePrefix string
The last name of the user must start with the value.
LastNameRegexp string
The regular expression match of the last name of the user.
LastNameSuffix string
The last name of the user must end with the value.
Roles []string
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
email String
Returns only users that exactly match this email.
emailContains String
Match when the value exist in the email of the user.
emailExclude String
Match when the value does not exist in the email of the user.
emailPrefix String
The email of the user must start with the value.
emailRegexp String
The regular expression match of the email of the user.
emailSuffix String
The email of the user must end with the value.
firstName String
Returns only users that exactly match the first name.
firstNameContains String
Match when the value exist in the first name of the user.
firstNameExclude String
Match when the value does not exist in the first name of the user.
firstNamePrefix String
The first name of the user must start with the value.
firstNameRegexp String
The regular expression match of the first name of the user.
firstNameSuffix String
The first name of the user must end with the value.
lastName String
Returns only users that exactly match the last name.
lastNameContains String
Match when the value exist in the last name of the user.
lastNameExclude String
Match when the value does not exist in the last name of the user.
lastNamePrefix String
The last name of the user must start with the value.
lastNameRegexp String
The regular expression match of the last name of the user.
lastNameSuffix String
The last name of the user must end with the value.
roles List<String>
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
email string
Returns only users that exactly match this email.
emailContains string
Match when the value exist in the email of the user.
emailExclude string
Match when the value does not exist in the email of the user.
emailPrefix string
The email of the user must start with the value.
emailRegexp string
The regular expression match of the email of the user.
emailSuffix string
The email of the user must end with the value.
firstName string
Returns only users that exactly match the first name.
firstNameContains string
Match when the value exist in the first name of the user.
firstNameExclude string
Match when the value does not exist in the first name of the user.
firstNamePrefix string
The first name of the user must start with the value.
firstNameRegexp string
The regular expression match of the first name of the user.
firstNameSuffix string
The first name of the user must end with the value.
lastName string
Returns only users that exactly match the last name.
lastNameContains string
Match when the value exist in the last name of the user.
lastNameExclude string
Match when the value does not exist in the last name of the user.
lastNamePrefix string
The last name of the user must start with the value.
lastNameRegexp string
The regular expression match of the last name of the user.
lastNameSuffix string
The last name of the user must end with the value.
roles string[]
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
email str
Returns only users that exactly match this email.
email_contains str
Match when the value exist in the email of the user.
email_exclude str
Match when the value does not exist in the email of the user.
email_prefix str
The email of the user must start with the value.
email_regexp str
The regular expression match of the email of the user.
email_suffix str
The email of the user must end with the value.
first_name str
Returns only users that exactly match the first name.
first_name_contains str
Match when the value exist in the first name of the user.
first_name_exclude str
Match when the value does not exist in the first name of the user.
first_name_prefix str
The first name of the user must start with the value.
first_name_regexp str
The regular expression match of the first name of the user.
first_name_suffix str
The first name of the user must end with the value.
last_name str
Returns only users that exactly match the last name.
last_name_contains str
Match when the value exist in the last name of the user.
last_name_exclude str
Match when the value does not exist in the last name of the user.
last_name_prefix str
The last name of the user must start with the value.
last_name_regexp str
The regular expression match of the last name of the user.
last_name_suffix str
The last name of the user must end with the value.
roles Sequence[str]
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
email String
Returns only users that exactly match this email.
emailContains String
Match when the value exist in the email of the user.
emailExclude String
Match when the value does not exist in the email of the user.
emailPrefix String
The email of the user must start with the value.
emailRegexp String
The regular expression match of the email of the user.
emailSuffix String
The email of the user must end with the value.
firstName String
Returns only users that exactly match the first name.
firstNameContains String
Match when the value exist in the first name of the user.
firstNameExclude String
Match when the value does not exist in the first name of the user.
firstNamePrefix String
The first name of the user must start with the value.
firstNameRegexp String
The regular expression match of the first name of the user.
firstNameSuffix String
The first name of the user must end with the value.
lastName String
Returns only users that exactly match the last name.
lastNameContains String
Match when the value exist in the last name of the user.
lastNameExclude String
Match when the value does not exist in the last name of the user.
lastNamePrefix String
The last name of the user must start with the value.
lastNameRegexp String
The regular expression match of the last name of the user.
lastNameSuffix String
The last name of the user must end with the value.
roles List<String>
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.

getTwingateUsers Result

The following output properties are available:

Id string
The ID of this resource.
Users List<Twingate.Twingate.Outputs.GetTwingateUsersUser>
Email string
Returns only users that exactly match this email.
EmailContains string
Match when the value exist in the email of the user.
EmailExclude string
Match when the value does not exist in the email of the user.
EmailPrefix string
The email of the user must start with the value.
EmailRegexp string
The regular expression match of the email of the user.
EmailSuffix string
The email of the user must end with the value.
FirstName string
Returns only users that exactly match the first name.
FirstNameContains string
Match when the value exist in the first name of the user.
FirstNameExclude string
Match when the value does not exist in the first name of the user.
FirstNamePrefix string
The first name of the user must start with the value.
FirstNameRegexp string
The regular expression match of the first name of the user.
FirstNameSuffix string
The first name of the user must end with the value.
LastName string
Returns only users that exactly match the last name.
LastNameContains string
Match when the value exist in the last name of the user.
LastNameExclude string
Match when the value does not exist in the last name of the user.
LastNamePrefix string
The last name of the user must start with the value.
LastNameRegexp string
The regular expression match of the last name of the user.
LastNameSuffix string
The last name of the user must end with the value.
Roles List<string>
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
Id string
The ID of this resource.
Users []GetTwingateUsersUser
Email string
Returns only users that exactly match this email.
EmailContains string
Match when the value exist in the email of the user.
EmailExclude string
Match when the value does not exist in the email of the user.
EmailPrefix string
The email of the user must start with the value.
EmailRegexp string
The regular expression match of the email of the user.
EmailSuffix string
The email of the user must end with the value.
FirstName string
Returns only users that exactly match the first name.
FirstNameContains string
Match when the value exist in the first name of the user.
FirstNameExclude string
Match when the value does not exist in the first name of the user.
FirstNamePrefix string
The first name of the user must start with the value.
FirstNameRegexp string
The regular expression match of the first name of the user.
FirstNameSuffix string
The first name of the user must end with the value.
LastName string
Returns only users that exactly match the last name.
LastNameContains string
Match when the value exist in the last name of the user.
LastNameExclude string
Match when the value does not exist in the last name of the user.
LastNamePrefix string
The last name of the user must start with the value.
LastNameRegexp string
The regular expression match of the last name of the user.
LastNameSuffix string
The last name of the user must end with the value.
Roles []string
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
id String
The ID of this resource.
users List<GetTwingateUsersUser>
email String
Returns only users that exactly match this email.
emailContains String
Match when the value exist in the email of the user.
emailExclude String
Match when the value does not exist in the email of the user.
emailPrefix String
The email of the user must start with the value.
emailRegexp String
The regular expression match of the email of the user.
emailSuffix String
The email of the user must end with the value.
firstName String
Returns only users that exactly match the first name.
firstNameContains String
Match when the value exist in the first name of the user.
firstNameExclude String
Match when the value does not exist in the first name of the user.
firstNamePrefix String
The first name of the user must start with the value.
firstNameRegexp String
The regular expression match of the first name of the user.
firstNameSuffix String
The first name of the user must end with the value.
lastName String
Returns only users that exactly match the last name.
lastNameContains String
Match when the value exist in the last name of the user.
lastNameExclude String
Match when the value does not exist in the last name of the user.
lastNamePrefix String
The last name of the user must start with the value.
lastNameRegexp String
The regular expression match of the last name of the user.
lastNameSuffix String
The last name of the user must end with the value.
roles List<String>
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
id string
The ID of this resource.
users GetTwingateUsersUser[]
email string
Returns only users that exactly match this email.
emailContains string
Match when the value exist in the email of the user.
emailExclude string
Match when the value does not exist in the email of the user.
emailPrefix string
The email of the user must start with the value.
emailRegexp string
The regular expression match of the email of the user.
emailSuffix string
The email of the user must end with the value.
firstName string
Returns only users that exactly match the first name.
firstNameContains string
Match when the value exist in the first name of the user.
firstNameExclude string
Match when the value does not exist in the first name of the user.
firstNamePrefix string
The first name of the user must start with the value.
firstNameRegexp string
The regular expression match of the first name of the user.
firstNameSuffix string
The first name of the user must end with the value.
lastName string
Returns only users that exactly match the last name.
lastNameContains string
Match when the value exist in the last name of the user.
lastNameExclude string
Match when the value does not exist in the last name of the user.
lastNamePrefix string
The last name of the user must start with the value.
lastNameRegexp string
The regular expression match of the last name of the user.
lastNameSuffix string
The last name of the user must end with the value.
roles string[]
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
id str
The ID of this resource.
users Sequence[GetTwingateUsersUser]
email str
Returns only users that exactly match this email.
email_contains str
Match when the value exist in the email of the user.
email_exclude str
Match when the value does not exist in the email of the user.
email_prefix str
The email of the user must start with the value.
email_regexp str
The regular expression match of the email of the user.
email_suffix str
The email of the user must end with the value.
first_name str
Returns only users that exactly match the first name.
first_name_contains str
Match when the value exist in the first name of the user.
first_name_exclude str
Match when the value does not exist in the first name of the user.
first_name_prefix str
The first name of the user must start with the value.
first_name_regexp str
The regular expression match of the first name of the user.
first_name_suffix str
The first name of the user must end with the value.
last_name str
Returns only users that exactly match the last name.
last_name_contains str
Match when the value exist in the last name of the user.
last_name_exclude str
Match when the value does not exist in the last name of the user.
last_name_prefix str
The last name of the user must start with the value.
last_name_regexp str
The regular expression match of the last name of the user.
last_name_suffix str
The last name of the user must end with the value.
roles Sequence[str]
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.
id String
The ID of this resource.
users List<Property Map>
email String
Returns only users that exactly match this email.
emailContains String
Match when the value exist in the email of the user.
emailExclude String
Match when the value does not exist in the email of the user.
emailPrefix String
The email of the user must start with the value.
emailRegexp String
The regular expression match of the email of the user.
emailSuffix String
The email of the user must end with the value.
firstName String
Returns only users that exactly match the first name.
firstNameContains String
Match when the value exist in the first name of the user.
firstNameExclude String
Match when the value does not exist in the first name of the user.
firstNamePrefix String
The first name of the user must start with the value.
firstNameRegexp String
The regular expression match of the first name of the user.
firstNameSuffix String
The first name of the user must end with the value.
lastName String
Returns only users that exactly match the last name.
lastNameContains String
Match when the value exist in the last name of the user.
lastNameExclude String
Match when the value does not exist in the last name of the user.
lastNamePrefix String
The last name of the user must start with the value.
lastNameRegexp String
The regular expression match of the last name of the user.
lastNameSuffix String
The last name of the user must end with the value.
roles List<String>
Returns users that match a list of roles. Valid roles: ADMIN, DEVOPS, SUPPORT, MEMBER.

Supporting Types

GetTwingateUsersUser

Email This property is required. string
The email address of the User
FirstName This property is required. string
The first name of the User
Id This property is required. string
The ID of the User
LastName This property is required. string
The last name of the User
Role This property is required. string
Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
Type This property is required. string
Indicates the User's type. Either MANUAL or SYNCED.
Email This property is required. string
The email address of the User
FirstName This property is required. string
The first name of the User
Id This property is required. string
The ID of the User
LastName This property is required. string
The last name of the User
Role This property is required. string
Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
Type This property is required. string
Indicates the User's type. Either MANUAL or SYNCED.
email This property is required. String
The email address of the User
firstName This property is required. String
The first name of the User
id This property is required. String
The ID of the User
lastName This property is required. String
The last name of the User
role This property is required. String
Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
type This property is required. String
Indicates the User's type. Either MANUAL or SYNCED.
email This property is required. string
The email address of the User
firstName This property is required. string
The first name of the User
id This property is required. string
The ID of the User
lastName This property is required. string
The last name of the User
role This property is required. string
Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
type This property is required. string
Indicates the User's type. Either MANUAL or SYNCED.
email This property is required. str
The email address of the User
first_name This property is required. str
The first name of the User
id This property is required. str
The ID of the User
last_name This property is required. str
The last name of the User
role This property is required. str
Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
type This property is required. str
Indicates the User's type. Either MANUAL or SYNCED.
email This property is required. String
The email address of the User
firstName This property is required. String
The first name of the User
id This property is required. String
The ID of the User
lastName This property is required. String
The last name of the User
role This property is required. String
Indicates the User's role. Either ADMIN, DEVOPS, SUPPORT, or MEMBER.
type This property is required. String
Indicates the User's type. Either MANUAL or SYNCED.

Package Details

Repository
twingate Twingate/pulumi-twingate
License
Apache-2.0
Notes
This Pulumi package is based on the twingate Terraform Provider.
Twingate v3.0.17 published on Wednesday, Apr 9, 2025 by Twingate