Azure DevOps v3.10.2 published on Wednesday, Oct 22, 2025 by Pulumi
azuredevops.getGroup
Start a Neo task
Explain and create an azuredevops.getGroup resource
Use this data source to access information about an existing Group within Azure DevOps
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const example = azuredevops.getProject({
name: "Example Project",
});
const exampleGetGroup = example.then(example => azuredevops.getGroup({
projectId: example.id,
name: "Example Group",
}));
export const groupId = exampleGetGroup.then(exampleGetGroup => exampleGetGroup.id);
export const groupDescriptor = exampleGetGroup.then(exampleGetGroup => exampleGetGroup.descriptor);
const example_collection_group = azuredevops.getGroup({
name: "Project Collection Administrators",
});
export const collectionGroupId = exampleGetGroup.then(exampleGetGroup => exampleGetGroup.id);
export const collectionGroupDescriptor = exampleGetGroup.then(exampleGetGroup => exampleGetGroup.descriptor);
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.get_project(name="Example Project")
example_get_group = azuredevops.get_group(project_id=example.id,
name="Example Group")
pulumi.export("groupId", example_get_group.id)
pulumi.export("groupDescriptor", example_get_group.descriptor)
example_collection_group = azuredevops.get_group(name="Project Collection Administrators")
pulumi.export("collectionGroupId", example_get_group.id)
pulumi.export("collectionGroupDescriptor", example_get_group.descriptor)
package main
import (
"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := azuredevops.LookupProject(ctx, &azuredevops.LookupProjectArgs{
Name: pulumi.StringRef("Example Project"),
}, nil)
if err != nil {
return err
}
exampleGetGroup, err := azuredevops.LookupGroup(ctx, &azuredevops.LookupGroupArgs{
ProjectId: pulumi.StringRef(example.Id),
Name: "Example Group",
}, nil)
if err != nil {
return err
}
ctx.Export("groupId", exampleGetGroup.Id)
ctx.Export("groupDescriptor", exampleGetGroup.Descriptor)
_, err = azuredevops.LookupGroup(ctx, &azuredevops.LookupGroupArgs{
Name: "Project Collection Administrators",
}, nil)
if err != nil {
return err
}
ctx.Export("collectionGroupId", exampleGetGroup.Id)
ctx.Export("collectionGroupDescriptor", exampleGetGroup.Descriptor)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var example = AzureDevOps.GetProject.Invoke(new()
{
Name = "Example Project",
});
var exampleGetGroup = AzureDevOps.GetGroup.Invoke(new()
{
ProjectId = example.Apply(getProjectResult => getProjectResult.Id),
Name = "Example Group",
});
var example_collection_group = AzureDevOps.GetGroup.Invoke(new()
{
Name = "Project Collection Administrators",
});
return new Dictionary<string, object?>
{
["groupId"] = exampleGetGroup.Apply(getGroupResult => getGroupResult.Id),
["groupDescriptor"] = exampleGetGroup.Apply(getGroupResult => getGroupResult.Descriptor),
["collectionGroupId"] = exampleGetGroup.Apply(getGroupResult => getGroupResult.Id),
["collectionGroupDescriptor"] = exampleGetGroup.Apply(getGroupResult => getGroupResult.Descriptor),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetProjectArgs;
import com.pulumi.azuredevops.inputs.GetGroupArgs;
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 example = AzuredevopsFunctions.getProject(GetProjectArgs.builder()
.name("Example Project")
.build());
final var exampleGetGroup = AzuredevopsFunctions.getGroup(GetGroupArgs.builder()
.projectId(example.id())
.name("Example Group")
.build());
ctx.export("groupId", exampleGetGroup.id());
ctx.export("groupDescriptor", exampleGetGroup.descriptor());
final var example-collection-group = AzuredevopsFunctions.getGroup(GetGroupArgs.builder()
.name("Project Collection Administrators")
.build());
ctx.export("collectionGroupId", exampleGetGroup.id());
ctx.export("collectionGroupDescriptor", exampleGetGroup.descriptor());
}
}
variables:
example:
fn::invoke:
function: azuredevops:getProject
arguments:
name: Example Project
exampleGetGroup:
fn::invoke:
function: azuredevops:getGroup
arguments:
projectId: ${example.id}
name: Example Group
example-collection-group:
fn::invoke:
function: azuredevops:getGroup
arguments:
name: Project Collection Administrators
outputs:
groupId: ${exampleGetGroup.id}
groupDescriptor: ${exampleGetGroup.descriptor}
collectionGroupId: ${exampleGetGroup.id}
collectionGroupDescriptor: ${exampleGetGroup.descriptor}
Relevant Links
PAT Permissions Required
- Graph: Read
- Work Items: Read
Using getGroup
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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>def get_group(name: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupResult
def get_group_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput> Note: This function is named LookupGroup in the Go SDK.
public static class GetGroup
{
public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
fn::invoke:
function: azuredevops:index/getGroup:getGroup
arguments:
# arguments dictionaryThe following arguments are supported:
- name str
- The Name of the Group.
- project_
id str - The ID of the Project. If
project_idis not specified the project collection groups will be searched.
getGroup Result
The following output properties are available:
- Descriptor string
- The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations. In format of
vssgp.xxxxxxxxxxxxxxxxxxx - Group
Id string - The ID of the group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Origin string
- The type of source provider for the origin identifier (ex:AD, AAD, MSA)
- Origin
Id string - The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
- Project
Id string
- Descriptor string
- The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations. In format of
vssgp.xxxxxxxxxxxxxxxxxxx - Group
Id string - The ID of the group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Origin string
- The type of source provider for the origin identifier (ex:AD, AAD, MSA)
- Origin
Id string - The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
- Project
Id string
- descriptor String
- The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations. In format of
vssgp.xxxxxxxxxxxxxxxxxxx - group
Id String - The ID of the group.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- origin String
- The type of source provider for the origin identifier (ex:AD, AAD, MSA)
- origin
Id String - The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
- project
Id String
- descriptor string
- The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations. In format of
vssgp.xxxxxxxxxxxxxxxxxxx - group
Id string - The ID of the group.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- origin string
- The type of source provider for the origin identifier (ex:AD, AAD, MSA)
- origin
Id string - The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
- project
Id string
- descriptor str
- The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations. In format of
vssgp.xxxxxxxxxxxxxxxxxxx - group_
id str - The ID of the group.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- origin str
- The type of source provider for the origin identifier (ex:AD, AAD, MSA)
- origin_
id str - The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
- project_
id str
- descriptor String
- The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations. In format of
vssgp.xxxxxxxxxxxxxxxxxxx - group
Id String - The ID of the group.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- origin String
- The type of source provider for the origin identifier (ex:AD, AAD, MSA)
- origin
Id String - The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
- project
Id String
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevopsTerraform Provider.
