AzureAD

Pulumi Official
Package maintained by Pulumi
v5.26.1 published on Monday, Jul 11, 2022 by Pulumi

getAdministrativeUnit

Gets information about an adminisrative unit in Azure Active Directory.

API Permissions

The following API permissions are required in order to use this data source.

When authenticated with a service principal, this data source requires one of the following application roles: AdministrativeUnit.Read.All or Directory.Read.All

When authenticated with a user principal, this data source does not require any additional roles.

Example Usage

By Group Display Name)

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AzureAD.GetAdministrativeUnit.InvokeAsync(new AzureAD.GetAdministrativeUnitArgs
        {
            DisplayName = "Example-AU",
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := azuread.LookupAdministrativeUnit(ctx, &GetAdministrativeUnitArgs{
			DisplayName: pulumi.StringRef("Example-AU"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(AzureadFunctions.getAdministrativeUnit(GetAdministrativeUnitArgs.builder()
            .displayName("Example-AU")
            .build()));

        }
}
import pulumi
import pulumi_azuread as azuread

example = azuread.get_administrative_unit(display_name="Example-AU")
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const example = pulumi.output(azuread.getAdministrativeUnit({
    displayName: "Example-AU",
}));
variables:
  example:
    Fn::Invoke:
      Function: azuread:getAdministrativeUnit
      Arguments:
        displayName: Example-AU

Using getAdministrativeUnit

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 getAdministrativeUnit(args: GetAdministrativeUnitArgs, opts?: InvokeOptions): Promise<GetAdministrativeUnitResult>
function getAdministrativeUnitOutput(args: GetAdministrativeUnitOutputArgs, opts?: InvokeOptions): Output<GetAdministrativeUnitResult>
def get_administrative_unit(display_name: Optional[str] = None,
                            object_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetAdministrativeUnitResult
def get_administrative_unit_output(display_name: Optional[pulumi.Input[str]] = None,
                            object_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetAdministrativeUnitResult]
func LookupAdministrativeUnit(ctx *Context, args *LookupAdministrativeUnitArgs, opts ...InvokeOption) (*LookupAdministrativeUnitResult, error)
func LookupAdministrativeUnitOutput(ctx *Context, args *LookupAdministrativeUnitOutputArgs, opts ...InvokeOption) LookupAdministrativeUnitResultOutput

> Note: This function is named LookupAdministrativeUnit in the Go SDK.

public static class GetAdministrativeUnit 
{
    public static Task<GetAdministrativeUnitResult> InvokeAsync(GetAdministrativeUnitArgs args, InvokeOptions? opts = null)
    public static Output<GetAdministrativeUnitResult> Invoke(GetAdministrativeUnitInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAdministrativeUnitResult> getAdministrativeUnit(GetAdministrativeUnitArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azuread:index/getAdministrativeUnit:getAdministrativeUnit
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DisplayName string

Specifies the display name of the administrative unit.

ObjectId string

Specifies the object ID of the administrative unit.

DisplayName string

Specifies the display name of the administrative unit.

ObjectId string

Specifies the object ID of the administrative unit.

displayName String

Specifies the display name of the administrative unit.

objectId String

Specifies the object ID of the administrative unit.

displayName string

Specifies the display name of the administrative unit.

objectId string

Specifies the object ID of the administrative unit.

display_name str

Specifies the display name of the administrative unit.

object_id str

Specifies the object ID of the administrative unit.

displayName String

Specifies the display name of the administrative unit.

objectId String

Specifies the object ID of the administrative unit.

getAdministrativeUnit Result

The following output properties are available:

Description string

The description of the administrative unit.

DisplayName string

The display name of the administrative unit.

Id string

The provider-assigned unique ID for this managed resource.

Members List<string>

A list of object IDs of members who are present in this administrative unit.

ObjectId string

The object ID of the administrative unit.

Visibility string

Whether the administrative unit and its members are hidden or publicly viewable in the directory. One of: Hiddenmembership or Public.

Description string

The description of the administrative unit.

DisplayName string

The display name of the administrative unit.

Id string

The provider-assigned unique ID for this managed resource.

Members []string

A list of object IDs of members who are present in this administrative unit.

ObjectId string

The object ID of the administrative unit.

Visibility string

Whether the administrative unit and its members are hidden or publicly viewable in the directory. One of: Hiddenmembership or Public.

description String

The description of the administrative unit.

displayName String

The display name of the administrative unit.

id String

The provider-assigned unique ID for this managed resource.

members List<String>

A list of object IDs of members who are present in this administrative unit.

objectId String

The object ID of the administrative unit.

visibility String

Whether the administrative unit and its members are hidden or publicly viewable in the directory. One of: Hiddenmembership or Public.

description string

The description of the administrative unit.

displayName string

The display name of the administrative unit.

id string

The provider-assigned unique ID for this managed resource.

members string[]

A list of object IDs of members who are present in this administrative unit.

objectId string

The object ID of the administrative unit.

visibility string

Whether the administrative unit and its members are hidden or publicly viewable in the directory. One of: Hiddenmembership or Public.

description str

The description of the administrative unit.

display_name str

The display name of the administrative unit.

id str

The provider-assigned unique ID for this managed resource.

members Sequence[str]

A list of object IDs of members who are present in this administrative unit.

object_id str

The object ID of the administrative unit.

visibility str

Whether the administrative unit and its members are hidden or publicly viewable in the directory. One of: Hiddenmembership or Public.

description String

The description of the administrative unit.

displayName String

The display name of the administrative unit.

id String

The provider-assigned unique ID for this managed resource.

members List<String>

A list of object IDs of members who are present in this administrative unit.

objectId String

The object ID of the administrative unit.

visibility String

Whether the administrative unit and its members are hidden or publicly viewable in the directory. One of: Hiddenmembership or Public.

Package Details

Repository
https://github.com/pulumi/pulumi-azuread
License
Apache-2.0
Notes

This Pulumi package is based on the azuread Terraform Provider.