getGroup

Gets information about an Azure Active Directory group.

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

By Group Display Name)

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AzureAD.GetGroup.InvokeAsync(new AzureAD.GetGroupArgs
        {
            DisplayName = "MyGroupName",
            SecurityEnabled = true,
        }));
    }

}
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 {
		opt0 := "MyGroupName"
		opt1 := true
		_, err := azuread.LookupGroup(ctx, &azuread.LookupGroupArgs{
			DisplayName:     &opt0,
			SecurityEnabled: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_azuread as azuread

example = azuread.get_group(display_name="MyGroupName",
    security_enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const example = pulumi.output(azuread.getGroup({
    displayName: "MyGroupName",
    securityEnabled: true,
}, { async: true }));

Using getGroup

function getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
def get_group(display_name: Optional[str] = None,
              mail_enabled: Optional[bool] = None,
              name: Optional[str] = None,
              object_id: Optional[str] = None,
              security_enabled: Optional[bool] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)

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

public static class GetGroup {
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DisplayName string
The display name for the Group.
MailEnabled bool
Whether the group is mail-enabled.
Name string

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

ObjectId string
Specifies the Object ID of the Group.
SecurityEnabled bool
Whether the group is a security group.
DisplayName string
The display name for the Group.
MailEnabled bool
Whether the group is mail-enabled.
Name string

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

ObjectId string
Specifies the Object ID of the Group.
SecurityEnabled bool
Whether the group is a security group.
displayName string
The display name for the Group.
mailEnabled boolean
Whether the group is mail-enabled.
name string

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

objectId string
Specifies the Object ID of the Group.
securityEnabled boolean
Whether the group is a security group.
display_name str
The display name for the Group.
mail_enabled bool
Whether the group is mail-enabled.
name str

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

object_id str
Specifies the Object ID of the Group.
security_enabled bool
Whether the group is a security group.

getGroup Result

The following output properties are available:

Description string
The optional description of the Group.
DisplayName string
The display name for the Group.
Id string
The provider-assigned unique ID for this managed resource.
MailEnabled bool
Whether the group is mail-enabled.
Members List<string>
The Object IDs of the Group members.
Name string

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

ObjectId string
Owners List<string>
The Object IDs of the Group owners.
SecurityEnabled bool
Whether the group is a security group.
Description string
The optional description of the Group.
DisplayName string
The display name for the Group.
Id string
The provider-assigned unique ID for this managed resource.
MailEnabled bool
Whether the group is mail-enabled.
Members []string
The Object IDs of the Group members.
Name string

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

ObjectId string
Owners []string
The Object IDs of the Group owners.
SecurityEnabled bool
Whether the group is a security group.
description string
The optional description of the Group.
displayName string
The display name for the Group.
id string
The provider-assigned unique ID for this managed resource.
mailEnabled boolean
Whether the group is mail-enabled.
members string[]
The Object IDs of the Group members.
name string

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

objectId string
owners string[]
The Object IDs of the Group owners.
securityEnabled boolean
Whether the group is a security group.
description str
The optional description of the Group.
display_name str
The display name for the Group.
id str
The provider-assigned unique ID for this managed resource.
mail_enabled bool
Whether the group is mail-enabled.
members Sequence[str]
The Object IDs of the Group members.
name str

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

object_id str
owners Sequence[str]
The Object IDs of the Group owners.
security_enabled bool
Whether the group is a security group.

Package Details

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