1. Registry
  2. Packages
  3. Vsphere Provider
  4. API Docs
  5. getSsoUser
Viewing docs for vSphere v4.18.0
published on Wednesday, Sep 2, 2026 by Pulumi
vsphere logo vsphere logo
Viewing docs for vSphere v4.18.0
published on Wednesday, Sep 2, 2026 by Pulumi

    The vsphere.SsoUser data source can be used to look up a vCenter Single Sign-On user by its username and domain, including users from external identity sources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    // A user in the local (system) domain.
    const local = vsphere.getSsoUser({
        name: "local.user",
    });
    // A user in an external identity source.
    const external = vsphere.getSsoUser({
        name: "john.doe",
        domain: "example.com",
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    # A user in the local (system) domain.
    local = vsphere.get_sso_user(name="local.user")
    # A user in an external identity source.
    external = vsphere.get_sso_user(name="john.doe",
        domain="example.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// A user in the local (system) domain.
    		_, err := vsphere.GetSsoUser(ctx, &vsphere.LookupSsoUserArgs{
    			Name: "local.user",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// A user in an external identity source.
    		_, err = vsphere.GetSsoUser(ctx, &vsphere.LookupSsoUserArgs{
    			Name:   "john.doe",
    			Domain: pulumi.StringRef("example.com"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        // A user in the local (system) domain.
        var local = VSphere.GetSsoUser.Invoke(new()
        {
            Name = "local.user",
        });
    
        // A user in an external identity source.
        var external = VSphere.GetSsoUser.Invoke(new()
        {
            Name = "john.doe",
            Domain = "example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetSsoUserArgs;
    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) {
            // A user in the local (system) domain.
            final var local = VsphereFunctions.getSsoUser(GetSsoUserArgs.builder()
                .name("local.user")
                .build());
    
            // A user in an external identity source.
            final var external = VsphereFunctions.getSsoUser(GetSsoUserArgs.builder()
                .name("john.doe")
                .domain("example.com")
                .build());
    
        }
    }
    
    variables:
      # A user in the local (system) domain.
      local:
        fn::invoke:
          function: vsphere:getSsoUser
          arguments:
            name: local.user
      # A user in an external identity source.
      external:
        fn::invoke:
          function: vsphere:getSsoUser
          arguments:
            name: john.doe
            domain: example.com
    
    pulumi {
      required_providers {
        vsphere = {
          source = "pulumi/vsphere"
        }
      }
    }
    
    data "vsphere_getssouser" "local" {
      name = "local.user"
    }
    data "vsphere_getssouser" "external" {
      name   = "john.doe"
      domain = "example.com"
    }
    
    # A user in the local (system) domain.
    # A user in an external identity source.
    

    Using getSsoUser

    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 getSsoUser(args: GetSsoUserArgs, opts?: InvokeOptions): Promise<GetSsoUserResult>
    function getSsoUserOutput(args: GetSsoUserOutputArgs, opts?: InvokeOutputOptions): Output<GetSsoUserResult>
    def get_sso_user(domain: Optional[str] = None,
                     name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetSsoUserResult
    def get_sso_user_output(domain: pulumi.Input[Optional[str]] = None,
                     name: pulumi.Input[Optional[str]] = None,
                     opts: Optional[InvokeOutputOptions] = None) -> Output[GetSsoUserResult]
    func LookupSsoUser(ctx *Context, args *LookupSsoUserArgs, opts ...InvokeOption) (*LookupSsoUserResult, error)
    func LookupSsoUserOutput(ctx *Context, args *LookupSsoUserOutputArgs, opts ...InvokeOption) LookupSsoUserResultOutput

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

    public static class GetSsoUser 
    {
        public static Task<GetSsoUserResult> InvokeAsync(GetSsoUserArgs args, InvokeOptions? opts = null)
        public static Output<GetSsoUserResult> Invoke(GetSsoUserInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSsoUserResult> Invoke(GetSsoUserInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSsoUserResult> getSsoUser(GetSsoUserArgs args, InvokeOptions options)
    public static Output<GetSsoUserResult> getSsoUser(GetSsoUserArgs args, InvokeOptions options)
    public static Output<GetSsoUserResult> getSsoUser(GetSsoUserArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: vsphere:index/getSsoUser:getSsoUser
      arguments:
        # arguments dictionary
    data "vsphere_get_sso_user" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The username of the user to look up.
    Domain string
    The identity source domain the user belongs to. Defaults to the local (system) domain.
    Name string
    The username of the user to look up.
    Domain string
    The identity source domain the user belongs to. Defaults to the local (system) domain.
    name string
    The username of the user to look up.
    domain string
    The identity source domain the user belongs to. Defaults to the local (system) domain.
    name String
    The username of the user to look up.
    domain String
    The identity source domain the user belongs to. Defaults to the local (system) domain.
    name string
    The username of the user to look up.
    domain string
    The identity source domain the user belongs to. Defaults to the local (system) domain.
    name str
    The username of the user to look up.
    domain str
    The identity source domain the user belongs to. Defaults to the local (system) domain.
    name String
    The username of the user to look up.
    domain String
    The identity source domain the user belongs to. Defaults to the local (system) domain.

    getSsoUser Result

    The following output properties are available:

    Description string
    The description of the user.
    Domain string
    The identity source domain the user belongs to.
    EmailAddress string
    The email address of the user.
    FirstName string
    The first name of the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastName string
    The last name of the user.
    Name string
    Description string
    The description of the user.
    Domain string
    The identity source domain the user belongs to.
    EmailAddress string
    The email address of the user.
    FirstName string
    The first name of the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastName string
    The last name of the user.
    Name string
    description string
    The description of the user.
    domain string
    The identity source domain the user belongs to.
    email_address string
    The email address of the user.
    first_name string
    The first name of the user.
    id string
    The provider-assigned unique ID for this managed resource.
    last_name string
    The last name of the user.
    name string
    description String
    The description of the user.
    domain String
    The identity source domain the user belongs to.
    emailAddress String
    The email address of the user.
    firstName String
    The first name of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    lastName String
    The last name of the user.
    name String
    description string
    The description of the user.
    domain string
    The identity source domain the user belongs to.
    emailAddress string
    The email address of the user.
    firstName string
    The first name of the user.
    id string
    The provider-assigned unique ID for this managed resource.
    lastName string
    The last name of the user.
    name string
    description str
    The description of the user.
    domain str
    The identity source domain the user belongs to.
    email_address str
    The email address of the user.
    first_name str
    The first name of the user.
    id str
    The provider-assigned unique ID for this managed resource.
    last_name str
    The last name of the user.
    name str
    description String
    The description of the user.
    domain String
    The identity source domain the user belongs to.
    emailAddress String
    The email address of the user.
    firstName String
    The first name of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    lastName String
    The last name of the user.
    name String

    Package Details

    Repository
    vSphere pulumi/pulumi-vsphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vsphere Terraform Provider.
    vsphere logo vsphere logo
    Viewing docs for vSphere v4.18.0
    published on Wednesday, Sep 2, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial