getGroups

Gets Object IDs or Display Names for multiple Azure Active Directory groups.

NOTE: If you’re authenticating using a Service Principal then it must have permissions to Read directory data within the Windows Azure Active Directory API.

Example Usage

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
    public MyStack()
    {
        var groups = Output.Create(AzureAD.GetGroups.InvokeAsync(new AzureAD.GetGroupsArgs
        {
            Names = 
            {
                "group-a",
                "group-b",
            },
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := azuread.GetGroups(ctx, &azuread.GetGroupsArgs{
			Names: []string{
				"group-a",
				"group-b",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_azuread as azuread

groups = azuread.get_groups(names=[
    "group-a",
    "group-b",
])
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const groups = pulumi.output(azuread.getGroups({
    names: [
        "group-a",
        "group-b",
    ],
}, { async: true }));

Using getGroups

function getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>
def get_groups(display_names: Optional[Sequence[str]] = None,
               names: Optional[Sequence[str]] = None,
               object_ids: Optional[Sequence[str]] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)

Note: This function is named GetGroups in the Go SDK.

public static class GetGroups {
    public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DisplayNames List<string>
Names List<string>
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

ObjectIds List<string>
The Object IDs of the Azure AD Groups.
DisplayNames []string
Names []string
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

ObjectIds []string
The Object IDs of the Azure AD Groups.
displayNames string[]
names string[]
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

objectIds string[]
The Object IDs of the Azure AD Groups.
display_names Sequence[str]
names Sequence[str]
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

object_ids Sequence[str]
The Object IDs of the Azure AD Groups.

getGroups Result

The following output properties are available:

DisplayNames List<string>
Id string
The provider-assigned unique ID for this managed resource.
Names List<string>
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

ObjectIds List<string>
The Object IDs of the Azure AD Groups.
DisplayNames []string
Id string
The provider-assigned unique ID for this managed resource.
Names []string
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

ObjectIds []string
The Object IDs of the Azure AD Groups.
displayNames string[]
id string
The provider-assigned unique ID for this managed resource.
names string[]
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

objectIds string[]
The Object IDs of the Azure AD Groups.
display_names Sequence[str]
id str
The provider-assigned unique ID for this managed resource.
names Sequence[str]
The Display Names of the Azure AD Groups.

Deprecated: This property has been renamed to display_names and will be removed in v2.0 of this provider.

object_ids Sequence[str]
The Object IDs of the Azure AD Groups.

Package Details

Repository
https://github.com/pulumi/pulumi-azuread
License
Apache-2.0
Notes
This Pulumi package is based on the azuread Terraform Provider.