Data Source: azuredevops_users

Use this data source to access information about an existing users within Azure DevOps.

Example Usage

# Load single user by using it's principal name
data "azuredevops_users" "example" {
  principal_name = "contoso-user@contoso.onmicrosoft.com"
}

# Load all users know inside an organization
data "azuredevops_users" "example-all-users" {
}

# Load all users know inside an organization with concurrent processing
data "azuredevops_users" "example-all-users" {
  features {
    concurrent_workers = 10
  }
}

# Load all users know inside an organization originating from a specific source (origin)
data "azuredevops_users" "example-all-from-origin" {
  origin = "aad"
}

# Load all users know inside an organization filtered by their subject types
data "azuredevops_users" "example-all-from-subject_types" {
  subject_types = ["aad", "msa"]
}

# Load a single user by origin and origin ID
data "azuredevops_users" "example-all-from-origin-id" {
  origin    = "aad"
  origin_id = "00000000-0000-0000-0000-000000000000"
}

Argument Reference

The following arguments are supported:

DataSource without specifying any arguments will return all users inside an organization.

List of possible subject types

AadUser                 = "aad" # Azure Active Directory Tenant
MsaUser                 = "msa" # Windows Live
UnknownUser             = "unusr"
BindPendingUser         = "bnd" # Invited user with pending redeem status
WindowsIdentity         = "win" # Windows Active Directory user
UnauthenticatedIdentity = "uauth"
ServiceIdentity         = "svc"
AggregateIdentity       = "agg"
ImportedIdentity        = "imp"
ServerTestIdentity      = "tst"
GroupScopeType          = "scp"
CspPartnerIdentity      = "csp"
SystemServicePrincipal  = "s2s"
SystemLicense           = "slic"
SystemScope             = "sscp"
SystemCspPartner        = "scsp"
SystemPublicAccess      = "spa"
SystemAccessControl     = "sace"
AcsServiceIdentity      = "acs"
Unknown                 = "ukn"

List of possible origins

ActiveDirectory          = "ad"   # Windows Active Directory
AzureActiveDirectory     = "aad"  # Azure Active Directory
MicrosoftAccount         = "msa"  # Windows Live Account
VisualStudioTeamServices = "vsts" # DevOps
GitHubDirectory          = "ghb"  # GitHub

A features block supports the following:

Attributes Reference

The following attributes are exported: