GetUser

Gets information about an Azure Active Directory user.

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 example = Output.Create(AzureAD.GetUser.InvokeAsync(new AzureAD.GetUserArgs
        {
            UserPrincipalName = "user@hashicorp.com",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_azuread as azuread

example = azuread.get_user(user_principal_name="user@hashicorp.com")
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const example = pulumi.output(azuread.getUser({
    userPrincipalName: "user@hashicorp.com",
}, { async: true }));

Using GetUser

function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function  get_user(mail_nickname=None, object_id=None, user_principal_name=None, opts=None)
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)

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

public static class GetUser {
    public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

MailNickname string

The email alias of the Azure AD User.

ObjectId string

Specifies the Object ID of the Application within Azure Active Directory.

UserPrincipalName string

The User Principal Name of the Azure AD User.

MailNickname string

The email alias of the Azure AD User.

ObjectId string

Specifies the Object ID of the Application within Azure Active Directory.

UserPrincipalName string

The User Principal Name of the Azure AD User.

mailNickname string

The email alias of the Azure AD User.

objectId string

Specifies the Object ID of the Application within Azure Active Directory.

userPrincipalName string

The User Principal Name of the Azure AD User.

mail_nickname str

The email alias of the Azure AD User.

object_id str

Specifies the Object ID of the Application within Azure Active Directory.

user_principal_name str

The User Principal Name of the Azure AD User.

GetUser Result

The following output properties are available:

AccountEnabled bool

True if the account is enabled; otherwise False.

DisplayName string

The Display Name of the Azure AD User.

Id string

The provider-assigned unique ID for this managed resource.

ImmutableId string

The value used to associate an on-premises Active Directory user account with their Azure AD user object.

Mail string

The primary email address of the Azure AD User.

MailNickname string

The email alias of the Azure AD User.

ObjectId string
OnpremisesSamAccountName string

The on premise sam account name of the Azure AD User.

OnpremisesUserPrincipalName string

The on premise user principal name of the Azure AD User.

UsageLocation string

The usage location of the Azure AD User.

UserPrincipalName string

The User Principal Name of the Azure AD User.

AccountEnabled bool

True if the account is enabled; otherwise False.

DisplayName string

The Display Name of the Azure AD User.

Id string

The provider-assigned unique ID for this managed resource.

ImmutableId string

The value used to associate an on-premises Active Directory user account with their Azure AD user object.

Mail string

The primary email address of the Azure AD User.

MailNickname string

The email alias of the Azure AD User.

ObjectId string
OnpremisesSamAccountName string

The on premise sam account name of the Azure AD User.

OnpremisesUserPrincipalName string

The on premise user principal name of the Azure AD User.

UsageLocation string

The usage location of the Azure AD User.

UserPrincipalName string

The User Principal Name of the Azure AD User.

accountEnabled boolean

True if the account is enabled; otherwise False.

displayName string

The Display Name of the Azure AD User.

id string

The provider-assigned unique ID for this managed resource.

immutableId string

The value used to associate an on-premises Active Directory user account with their Azure AD user object.

mail string

The primary email address of the Azure AD User.

mailNickname string

The email alias of the Azure AD User.

objectId string
onpremisesSamAccountName string

The on premise sam account name of the Azure AD User.

onpremisesUserPrincipalName string

The on premise user principal name of the Azure AD User.

usageLocation string

The usage location of the Azure AD User.

userPrincipalName string

The User Principal Name of the Azure AD User.

account_enabled bool

True if the account is enabled; otherwise False.

display_name str

The Display Name of the Azure AD User.

id str

The provider-assigned unique ID for this managed resource.

immutable_id str

The value used to associate an on-premises Active Directory user account with their Azure AD user object.

mail str

The primary email address of the Azure AD User.

mail_nickname str

The email alias of the Azure AD User.

object_id str
onpremises_sam_account_name str

The on premise sam account name of the Azure AD User.

onpremises_user_principal_name str

The on premise user principal name of the Azure AD User.

usage_location str

The usage location of the Azure AD User.

user_principal_name str

The User Principal Name of the Azure AD User.

Package Details

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