1. Packages
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. getCurrentUser

This provider is currently in preview.

Viewing docs for Pulumi Cloud v0.39.0
published on Tuesday, Apr 28, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Viewing docs for Pulumi Cloud v0.39.0
published on Tuesday, Apr 28, 2026 by Pulumi

    Returns the Pulumi Cloud user that the provider’s access token belongs to. Useful for seeding a newly-created Team with the creator as a member, since Pulumi Cloud auto-adds the creator. Omitting this user from the team will result in a refresh drift.

    Using getCurrentUser

    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 getCurrentUser(args: GetCurrentUserArgs, opts?: InvokeOptions): Promise<GetCurrentUserResult>
    function getCurrentUserOutput(args: GetCurrentUserOutputArgs, opts?: InvokeOptions): Output<GetCurrentUserResult>
    def get_current_user(opts: Optional[InvokeOptions] = None) -> GetCurrentUserResult
    def get_current_user_output(opts: Optional[InvokeOptions] = None) -> Output[GetCurrentUserResult]
    func GetCurrentUser(ctx *Context, args *GetCurrentUserArgs, opts ...InvokeOption) (*GetCurrentUserResult, error)
    func GetCurrentUserOutput(ctx *Context, args *GetCurrentUserOutputArgs, opts ...InvokeOption) GetCurrentUserResultOutput

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

    public static class GetCurrentUser 
    {
        public static Task<GetCurrentUserResult> InvokeAsync(GetCurrentUserArgs args, InvokeOptions? opts = null)
        public static Output<GetCurrentUserResult> Invoke(GetCurrentUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCurrentUserResult> getCurrentUser(GetCurrentUserArgs args, InvokeOptions options)
    public static Output<GetCurrentUserResult> getCurrentUser(GetCurrentUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: pulumiservice:getCurrentUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getCurrentUser Result

    The following output properties are available:

    AvatarUrl string
    URL of the user's avatar image.
    Email string
    The user's email address.
    Name string
    The user's display name.
    Username string
    The user's Pulumi Cloud username.
    AvatarUrl string
    URL of the user's avatar image.
    Email string
    The user's email address.
    Name string
    The user's display name.
    Username string
    The user's Pulumi Cloud username.
    avatarUrl String
    URL of the user's avatar image.
    email String
    The user's email address.
    name String
    The user's display name.
    username String
    The user's Pulumi Cloud username.
    avatarUrl string
    URL of the user's avatar image.
    email string
    The user's email address.
    name string
    The user's display name.
    username string
    The user's Pulumi Cloud username.
    avatar_url str
    URL of the user's avatar image.
    email str
    The user's email address.
    name str
    The user's display name.
    username str
    The user's Pulumi Cloud username.
    avatarUrl String
    URL of the user's avatar image.
    email String
    The user's email address.
    name String
    The user's display name.
    username String
    The user's Pulumi Cloud username.

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo

    This provider is currently in preview.

    Viewing docs for Pulumi Cloud v0.39.0
    published on Tuesday, Apr 28, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.