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 datawithin theWindows Azure Active DirectoryAPI.
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
LookupUserin the Go SDK.
public static class GetUser {
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Mail
Nickname string The email alias of the Azure AD User.
- Object
Id string Specifies the Object ID of the Application within Azure Active Directory.
- User
Principal stringName The User Principal Name of the Azure AD User.
- Mail
Nickname string The email alias of the Azure AD User.
- Object
Id string Specifies the Object ID of the Application within Azure Active Directory.
- User
Principal stringName The User Principal Name of the Azure AD User.
- mail
Nickname string The email alias of the Azure AD User.
- object
Id string Specifies the Object ID of the Application within Azure Active Directory.
- user
Principal stringName 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_ strname The User Principal Name of the Azure AD User.
GetUser Result
The following output properties are available:
- Account
Enabled bool Trueif the account is enabled; otherwiseFalse.- Display
Name string The Display Name of the Azure AD User.
- Id string
The provider-assigned unique ID for this managed resource.
- Immutable
Id 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.
- Mail
Nickname string The email alias of the Azure AD User.
- Object
Id string - Onpremises
Sam stringAccount Name The on premise sam account name of the Azure AD User.
- Onpremises
User stringPrincipal Name The on premise user principal name of the Azure AD User.
- Usage
Location string The usage location of the Azure AD User.
- User
Principal stringName The User Principal Name of the Azure AD User.
- Account
Enabled bool Trueif the account is enabled; otherwiseFalse.- Display
Name string The Display Name of the Azure AD User.
- Id string
The provider-assigned unique ID for this managed resource.
- Immutable
Id 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.
- Mail
Nickname string The email alias of the Azure AD User.
- Object
Id string - Onpremises
Sam stringAccount Name The on premise sam account name of the Azure AD User.
- Onpremises
User stringPrincipal Name The on premise user principal name of the Azure AD User.
- Usage
Location string The usage location of the Azure AD User.
- User
Principal stringName The User Principal Name of the Azure AD User.
- account
Enabled boolean Trueif the account is enabled; otherwiseFalse.- display
Name string The Display Name of the Azure AD User.
- id string
The provider-assigned unique ID for this managed resource.
- immutable
Id 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.
- mail
Nickname string The email alias of the Azure AD User.
- object
Id string - onpremises
Sam stringAccount Name The on premise sam account name of the Azure AD User.
- onpremises
User stringPrincipal Name The on premise user principal name of the Azure AD User.
- usage
Location string The usage location of the Azure AD User.
- user
Principal stringName The User Principal Name of the Azure AD User.
- account_
enabled bool Trueif the account is enabled; otherwiseFalse.- 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_ straccount_ name The on premise sam account name of the Azure AD User.
- onpremises_
user_ strprincipal_ name The on premise user principal name of the Azure AD User.
- usage_
location str The usage location of the Azure AD User.
- user_
principal_ strname 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
azureadTerraform Provider.