1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getUser
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.getUser

Explore with Pulumi AI

GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

The gitlab.User data source allows details of a user to be retrieved by either the user ID, username or email address.

Some attributes might not be returned depending on if you’re an admin or not.

When using the email attribute, an exact match is not guaranteed. The most related match will be returned. The most related match will prioritize an exact match if one is available.

Upstream API: GitLab REST API docs

Using getUser

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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
Copy
def get_user(email: Optional[str] = None,
             namespace_id: Optional[int] = None,
             user_id: Optional[int] = None,
             username: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(email: Optional[pulumi.Input[str]] = None,
             namespace_id: Optional[pulumi.Input[int]] = None,
             user_id: Optional[pulumi.Input[int]] = None,
             username: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
Copy
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput
Copy

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

public static class GetUser 
{
    public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
    public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gitlab:index/getUser:getUser
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Email string
The public email address of the user.
NamespaceId int
The ID of the user's namespace. Requires admin token to access this field.
UserId int
The ID of the user.
Username string
The username of the user.
Email string
The public email address of the user.
NamespaceId int
The ID of the user's namespace. Requires admin token to access this field.
UserId int
The ID of the user.
Username string
The username of the user.
email String
The public email address of the user.
namespaceId Integer
The ID of the user's namespace. Requires admin token to access this field.
userId Integer
The ID of the user.
username String
The username of the user.
email string
The public email address of the user.
namespaceId number
The ID of the user's namespace. Requires admin token to access this field.
userId number
The ID of the user.
username string
The username of the user.
email str
The public email address of the user.
namespace_id int
The ID of the user's namespace. Requires admin token to access this field.
user_id int
The ID of the user.
username str
The username of the user.
email String
The public email address of the user.
namespaceId Number
The ID of the user's namespace. Requires admin token to access this field.
userId Number
The ID of the user.
username String
The username of the user.

getUser Result

The following output properties are available:

AvatarUrl string
The avatar URL of the user.
Bio string
The bio of the user.
CanCreateGroup bool
Whether the user can create groups.
CanCreateProject bool
Whether the user can create projects.
ColorSchemeId int
User's color scheme ID.
CreatedAt string
Date the user was created at.
CurrentSignInAt string
Current user's sign-in date.
Email string
The public email address of the user.
ExternUid string
The external UID of the user.
External bool
Whether the user is external.
Id string
The provider-assigned unique ID for this managed resource.
IsAdmin bool
Whether the user is an admin.
IsBot bool
Whether the user is a bot.
LastSignInAt string
Last user's sign-in date.
Linkedin string
LinkedIn profile of the user.
Location string
The location of the user.
Name string
The name of the user.
NamespaceId int
The ID of the user's namespace. Requires admin token to access this field.
Note string
Admin notes for this user.
Organization string
The organization of the user.
ProjectsLimit int
Number of projects the user can create.
Skype string
Skype username of the user.
State string
Whether the user is active or blocked.
ThemeId int
User's theme ID.
Twitter string
Twitter username of the user.
TwoFactorEnabled bool
Whether user's two-factor auth is enabled.
UserId int
The ID of the user.
UserProvider string
The UID provider of the user.
Username string
The username of the user.
WebsiteUrl string
User's website URL.
AvatarUrl string
The avatar URL of the user.
Bio string
The bio of the user.
CanCreateGroup bool
Whether the user can create groups.
CanCreateProject bool
Whether the user can create projects.
ColorSchemeId int
User's color scheme ID.
CreatedAt string
Date the user was created at.
CurrentSignInAt string
Current user's sign-in date.
Email string
The public email address of the user.
ExternUid string
The external UID of the user.
External bool
Whether the user is external.
Id string
The provider-assigned unique ID for this managed resource.
IsAdmin bool
Whether the user is an admin.
IsBot bool
Whether the user is a bot.
LastSignInAt string
Last user's sign-in date.
Linkedin string
LinkedIn profile of the user.
Location string
The location of the user.
Name string
The name of the user.
NamespaceId int
The ID of the user's namespace. Requires admin token to access this field.
Note string
Admin notes for this user.
Organization string
The organization of the user.
ProjectsLimit int
Number of projects the user can create.
Skype string
Skype username of the user.
State string
Whether the user is active or blocked.
ThemeId int
User's theme ID.
Twitter string
Twitter username of the user.
TwoFactorEnabled bool
Whether user's two-factor auth is enabled.
UserId int
The ID of the user.
UserProvider string
The UID provider of the user.
Username string
The username of the user.
WebsiteUrl string
User's website URL.
avatarUrl String
The avatar URL of the user.
bio String
The bio of the user.
canCreateGroup Boolean
Whether the user can create groups.
canCreateProject Boolean
Whether the user can create projects.
colorSchemeId Integer
User's color scheme ID.
createdAt String
Date the user was created at.
currentSignInAt String
Current user's sign-in date.
email String
The public email address of the user.
externUid String
The external UID of the user.
external Boolean
Whether the user is external.
id String
The provider-assigned unique ID for this managed resource.
isAdmin Boolean
Whether the user is an admin.
isBot Boolean
Whether the user is a bot.
lastSignInAt String
Last user's sign-in date.
linkedin String
LinkedIn profile of the user.
location String
The location of the user.
name String
The name of the user.
namespaceId Integer
The ID of the user's namespace. Requires admin token to access this field.
note String
Admin notes for this user.
organization String
The organization of the user.
projectsLimit Integer
Number of projects the user can create.
skype String
Skype username of the user.
state String
Whether the user is active or blocked.
themeId Integer
User's theme ID.
twitter String
Twitter username of the user.
twoFactorEnabled Boolean
Whether user's two-factor auth is enabled.
userId Integer
The ID of the user.
userProvider String
The UID provider of the user.
username String
The username of the user.
websiteUrl String
User's website URL.
avatarUrl string
The avatar URL of the user.
bio string
The bio of the user.
canCreateGroup boolean
Whether the user can create groups.
canCreateProject boolean
Whether the user can create projects.
colorSchemeId number
User's color scheme ID.
createdAt string
Date the user was created at.
currentSignInAt string
Current user's sign-in date.
email string
The public email address of the user.
externUid string
The external UID of the user.
external boolean
Whether the user is external.
id string
The provider-assigned unique ID for this managed resource.
isAdmin boolean
Whether the user is an admin.
isBot boolean
Whether the user is a bot.
lastSignInAt string
Last user's sign-in date.
linkedin string
LinkedIn profile of the user.
location string
The location of the user.
name string
The name of the user.
namespaceId number
The ID of the user's namespace. Requires admin token to access this field.
note string
Admin notes for this user.
organization string
The organization of the user.
projectsLimit number
Number of projects the user can create.
skype string
Skype username of the user.
state string
Whether the user is active or blocked.
themeId number
User's theme ID.
twitter string
Twitter username of the user.
twoFactorEnabled boolean
Whether user's two-factor auth is enabled.
userId number
The ID of the user.
userProvider string
The UID provider of the user.
username string
The username of the user.
websiteUrl string
User's website URL.
avatar_url str
The avatar URL of the user.
bio str
The bio of the user.
can_create_group bool
Whether the user can create groups.
can_create_project bool
Whether the user can create projects.
color_scheme_id int
User's color scheme ID.
created_at str
Date the user was created at.
current_sign_in_at str
Current user's sign-in date.
email str
The public email address of the user.
extern_uid str
The external UID of the user.
external bool
Whether the user is external.
id str
The provider-assigned unique ID for this managed resource.
is_admin bool
Whether the user is an admin.
is_bot bool
Whether the user is a bot.
last_sign_in_at str
Last user's sign-in date.
linkedin str
LinkedIn profile of the user.
location str
The location of the user.
name str
The name of the user.
namespace_id int
The ID of the user's namespace. Requires admin token to access this field.
note str
Admin notes for this user.
organization str
The organization of the user.
projects_limit int
Number of projects the user can create.
skype str
Skype username of the user.
state str
Whether the user is active or blocked.
theme_id int
User's theme ID.
twitter str
Twitter username of the user.
two_factor_enabled bool
Whether user's two-factor auth is enabled.
user_id int
The ID of the user.
user_provider str
The UID provider of the user.
username str
The username of the user.
website_url str
User's website URL.
avatarUrl String
The avatar URL of the user.
bio String
The bio of the user.
canCreateGroup Boolean
Whether the user can create groups.
canCreateProject Boolean
Whether the user can create projects.
colorSchemeId Number
User's color scheme ID.
createdAt String
Date the user was created at.
currentSignInAt String
Current user's sign-in date.
email String
The public email address of the user.
externUid String
The external UID of the user.
external Boolean
Whether the user is external.
id String
The provider-assigned unique ID for this managed resource.
isAdmin Boolean
Whether the user is an admin.
isBot Boolean
Whether the user is a bot.
lastSignInAt String
Last user's sign-in date.
linkedin String
LinkedIn profile of the user.
location String
The location of the user.
name String
The name of the user.
namespaceId Number
The ID of the user's namespace. Requires admin token to access this field.
note String
Admin notes for this user.
organization String
The organization of the user.
projectsLimit Number
Number of projects the user can create.
skype String
Skype username of the user.
state String
Whether the user is active or blocked.
themeId Number
User's theme ID.
twitter String
Twitter username of the user.
twoFactorEnabled Boolean
Whether user's two-factor auth is enabled.
userId Number
The ID of the user.
userProvider String
The UID provider of the user.
username String
The username of the user.
websiteUrl String
User's website URL.

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi