azuread.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)
Look up by display name
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = azuread.getAdministrativeUnit({
displayName: "Example-AU",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.get_administrative_unit(display_name="Example-AU")
package main
import (
"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azuread.LookupAdministrativeUnit(ctx, &azuread.LookupAdministrativeUnitArgs{
DisplayName: pulumi.StringRef("Example-AU"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureAD = Pulumi.AzureAD;
return await Deployment.RunAsync(() =>
{
var example = AzureAD.GetAdministrativeUnit.Invoke(new()
{
DisplayName = "Example-AU",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetAdministrativeUnitArgs;
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 = AzureadFunctions.getAdministrativeUnit(GetAdministrativeUnitArgs.builder()
.displayName("Example-AU")
.build());
}
}
variables:
example:
fn::invoke:
function: azuread:getAdministrativeUnit
arguments:
displayName: Example-AU
Look up by object ID
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = azuread.getAdministrativeUnit({
objectId: "00000000-0000-0000-0000-000000000000",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.get_administrative_unit(object_id="00000000-0000-0000-0000-000000000000")
package main
import (
"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azuread.LookupAdministrativeUnit(ctx, &azuread.LookupAdministrativeUnitArgs{
ObjectId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureAD = Pulumi.AzureAD;
return await Deployment.RunAsync(() =>
{
var example = AzureAD.GetAdministrativeUnit.Invoke(new()
{
ObjectId = "00000000-0000-0000-0000-000000000000",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetAdministrativeUnitArgs;
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 = AzureadFunctions.getAdministrativeUnit(GetAdministrativeUnitArgs.builder()
.objectId("00000000-0000-0000-0000-000000000000")
.build());
}
}
variables:
example:
fn::invoke:
function: azuread:getAdministrativeUnit
arguments:
objectId: 00000000-0000-0000-0000-000000000000
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)
public static Output<GetAdministrativeUnitResult> getAdministrativeUnit(GetAdministrativeUnitArgs args, InvokeOptions options)
fn::invoke:
function: azuread:index/getAdministrativeUnit:getAdministrativeUnit
arguments:
# arguments dictionaryThe following arguments are supported:
- Display
Name string - Specifies the display name of the administrative unit.
- Object
Id string Specifies the object ID of the administrative unit.
One of
display_nameorobject_idmust be specified.
- Display
Name string - Specifies the display name of the administrative unit.
- Object
Id string Specifies the object ID of the administrative unit.
One of
display_nameorobject_idmust be specified.
- display
Name String - Specifies the display name of the administrative unit.
- object
Id String Specifies the object ID of the administrative unit.
One of
display_nameorobject_idmust be specified.
- display
Name string - Specifies the display name of the administrative unit.
- object
Id string Specifies the object ID of the administrative unit.
One of
display_nameorobject_idmust be specified.
- display_
name str - Specifies the display name of the administrative unit.
- object_
id str Specifies the object ID of the administrative unit.
One of
display_nameorobject_idmust be specified.
- display
Name String - Specifies the display name of the administrative unit.
- object
Id String Specifies the object ID of the administrative unit.
One of
display_nameorobject_idmust be specified.
getAdministrativeUnit Result
The following output properties are available:
- Description string
- The description of the administrative unit.
- Display
Name 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.
- Object
Id 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:
HiddenmembershiporPublic.
- Description string
- The description of the administrative unit.
- Display
Name 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.
- Object
Id 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:
HiddenmembershiporPublic.
- description String
- The description of the administrative unit.
- display
Name 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.
- object
Id 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:
HiddenmembershiporPublic.
- description string
- The description of the administrative unit.
- display
Name 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.
- object
Id 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:
HiddenmembershiporPublic.
- 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:
HiddenmembershiporPublic.
- description String
- The description of the administrative unit.
- display
Name 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.
- object
Id 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:
HiddenmembershiporPublic.
Package Details
- Repository
- Azure Active Directory (Azure AD) pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azureadTerraform Provider.
