1. Packages
  2. Github Provider
  3. API Docs
  4. getUserExternalIdentity
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.getUserExternalIdentity

Explore with Pulumi AI

GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

Use this data source to retrieve a specific organization member’s SAML or SCIM user attributes.

Example Usage

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

const exampleUser = github.getUserExternalIdentity({
    username: "example-user",
});
Copy
import pulumi
import pulumi_github as github

example_user = github.get_user_external_identity(username="example-user")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := github.GetUserExternalIdentity(ctx, &github.GetUserExternalIdentityArgs{
			Username: "example-user",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var exampleUser = Github.GetUserExternalIdentity.Invoke(new()
    {
        Username = "example-user",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetUserExternalIdentityArgs;
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 exampleUser = GithubFunctions.getUserExternalIdentity(GetUserExternalIdentityArgs.builder()
            .username("example-user")
            .build());

    }
}
Copy
variables:
  exampleUser:
    fn::invoke:
      function: github:getUserExternalIdentity
      arguments:
        username: example-user
Copy

Using getUserExternalIdentity

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 getUserExternalIdentity(args: GetUserExternalIdentityArgs, opts?: InvokeOptions): Promise<GetUserExternalIdentityResult>
function getUserExternalIdentityOutput(args: GetUserExternalIdentityOutputArgs, opts?: InvokeOptions): Output<GetUserExternalIdentityResult>
Copy
def get_user_external_identity(username: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetUserExternalIdentityResult
def get_user_external_identity_output(username: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetUserExternalIdentityResult]
Copy
func GetUserExternalIdentity(ctx *Context, args *GetUserExternalIdentityArgs, opts ...InvokeOption) (*GetUserExternalIdentityResult, error)
func GetUserExternalIdentityOutput(ctx *Context, args *GetUserExternalIdentityOutputArgs, opts ...InvokeOption) GetUserExternalIdentityResultOutput
Copy

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

public static class GetUserExternalIdentity 
{
    public static Task<GetUserExternalIdentityResult> InvokeAsync(GetUserExternalIdentityArgs args, InvokeOptions? opts = null)
    public static Output<GetUserExternalIdentityResult> Invoke(GetUserExternalIdentityInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserExternalIdentityResult> getUserExternalIdentity(GetUserExternalIdentityArgs args, InvokeOptions options)
public static Output<GetUserExternalIdentityResult> getUserExternalIdentity(GetUserExternalIdentityArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: github:index/getUserExternalIdentity:getUserExternalIdentity
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Username This property is required. string
The username of the member to fetch external identity for.
Username This property is required. string
The username of the member to fetch external identity for.
username This property is required. String
The username of the member to fetch external identity for.
username This property is required. string
The username of the member to fetch external identity for.
username This property is required. str
The username of the member to fetch external identity for.
username This property is required. String
The username of the member to fetch external identity for.

getUserExternalIdentity Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Login string
The username of the GitHub user
SamlIdentity Dictionary<string, string>
An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML.
ScimIdentity Dictionary<string, string>
An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM.
Username string
The member's SAML Username
Id string
The provider-assigned unique ID for this managed resource.
Login string
The username of the GitHub user
SamlIdentity map[string]string
An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML.
ScimIdentity map[string]string
An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM.
Username string
The member's SAML Username
id String
The provider-assigned unique ID for this managed resource.
login String
The username of the GitHub user
samlIdentity Map<String,String>
An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML.
scimIdentity Map<String,String>
An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM.
username String
The member's SAML Username
id string
The provider-assigned unique ID for this managed resource.
login string
The username of the GitHub user
samlIdentity {[key: string]: string}
An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML.
scimIdentity {[key: string]: string}
An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM.
username string
The member's SAML Username
id str
The provider-assigned unique ID for this managed resource.
login str
The username of the GitHub user
saml_identity Mapping[str, str]
An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML.
scim_identity Mapping[str, str]
An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM.
username str
The member's SAML Username
id String
The provider-assigned unique ID for this managed resource.
login String
The username of the GitHub user
samlIdentity Map<String>
An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML.
scimIdentity Map<String>
An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM.
username String
The member's SAML Username

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi