GetUsers
Use this data source to access information about an existing users within Azure DevOps.
Relevant Links
Example Usage
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
class MyStack : Stack
{
public MyStack()
{
var user = Output.Create(AzureDevOps.Identities.GetUsers.InvokeAsync(new AzureDevOps.Identities.GetUsersArgs
{
PrincipalName = "contoso-user@contoso.onmicrosoft.com",
}));
var all_users = Output.Create(AzureDevOps.Identities.GetUsers.InvokeAsync());
var all_from_origin = Output.Create(AzureDevOps.Identities.GetUsers.InvokeAsync(new AzureDevOps.Identities.GetUsersArgs
{
Origin = "aad",
}));
var all_from_subjectTypes = Output.Create(AzureDevOps.Identities.GetUsers.InvokeAsync(new AzureDevOps.Identities.GetUsersArgs
{
SubjectTypes =
{
"aad",
"msa",
},
}));
var all_from_origin_id = Output.Create(AzureDevOps.Identities.GetUsers.InvokeAsync(new AzureDevOps.Identities.GetUsersArgs
{
Origin = "aad",
OriginId = "a7ead982-8438-4cd2-b9e3-c3aa51a7b675",
}));
}
}
Coming soon!
import pulumi
import pulumi_azuredevops as azuredevops
user = azuredevops.Identities.get_users(principal_name="contoso-user@contoso.onmicrosoft.com")
all_users = azuredevops.Identities.get_users()
all_from_origin = azuredevops.Identities.get_users(origin="aad")
all_from_subject_types = azuredevops.Identities.get_users(subject_types=[
"aad",
"msa",
])
all_from_origin_id = azuredevops.Identities.get_users(origin="aad",
origin_id="a7ead982-8438-4cd2-b9e3-c3aa51a7b675")import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
// Load single user by using it's principal name
const user = pulumi.output(azuredevops.Identities.getUsers({
principalName: "contoso-user@contoso.onmicrosoft.com",
}, { async: true }));
// Load all users know inside an organization
const all_users = pulumi.output(azuredevops.Identities.getUsers({ async: true }));
// Load all users know inside an organization originating from a specific source (origin)
const all_from_origin = pulumi.output(azuredevops.Identities.getUsers({
origin: "aad",
}, { async: true }));
// Load all users know inside an organization filtered by their subject types
const all_from_subject_types = pulumi.output(azuredevops.Identities.getUsers({
subjectTypes: [
"aad",
"msa",
],
}, { async: true }));
// Load a single user by origin and origin ID
const all_from_origin_id = pulumi.output(azuredevops.Identities.getUsers({
origin: "aad",
originId: "a7ead982-8438-4cd2-b9e3-c3aa51a7b675",
}, { async: true }));Using GetUsers
function getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>function get_users(origin=None, origin_id=None, principal_name=None, subject_types=None, opts=None)func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)public static class GetUsers {
public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetUsers Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Users
List<Pulumi.
Azure Dev Ops. Identities. Outputs. Get Users User> - Origin string
- Origin
Id string - Principal
Name string - Subject
Types List<string>
- Id string
The provider-assigned unique ID for this managed resource.
- Users
[]Get
Users User - Origin string
- Origin
Id string - Principal
Name string - Subject
Types []string
- id string
The provider-assigned unique ID for this managed resource.
- users
Get
Users User[] - origin string
- origin
Id string - principal
Name string - subject
Types string[]
- id str
The provider-assigned unique ID for this managed resource.
- users
List[Get
Users User] - origin str
- origin_
id str - principal_
name str - subject_
types List[str]
Supporting Types
GetUsersUser
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevopsTerraform Provider.