azuread.User
Explore with Pulumi AI
Manages a user within Azure Active Directory.
API Permissions
The following API permissions are required in order to use this resource.
When authenticated with a service principal, this resource requires one of the following application roles: User.ReadWrite.All
or Directory.ReadWrite.All
When authenticated with a user principal, this resource requires one of the following directory roles: User Administrator
or Global Administrator
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = new azuread.User("example", {
userPrincipalName: "jdoe@example.com",
displayName: "J. Doe",
mailNickname: "jdoe",
password: "SecretP@sswd99!",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.User("example",
user_principal_name="jdoe@example.com",
display_name="J. Doe",
mail_nickname="jdoe",
password="SecretP@sswd99!")
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.NewUser(ctx, "example", &azuread.UserArgs{
UserPrincipalName: pulumi.String("jdoe@example.com"),
DisplayName: pulumi.String("J. Doe"),
MailNickname: pulumi.String("jdoe"),
Password: pulumi.String("SecretP@sswd99!"),
})
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 = new AzureAD.User("example", new()
{
UserPrincipalName = "jdoe@example.com",
DisplayName = "J. Doe",
MailNickname = "jdoe",
Password = "SecretP@sswd99!",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.User;
import com.pulumi.azuread.UserArgs;
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) {
var example = new User("example", UserArgs.builder()
.userPrincipalName("jdoe@example.com")
.displayName("J. Doe")
.mailNickname("jdoe")
.password("SecretP@sswd99!")
.build());
}
}
resources:
example:
type: azuread:User
properties:
userPrincipalName: jdoe@example.com
displayName: J. Doe
mailNickname: jdoe
password: SecretP@sswd99!
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
user_principal_name: Optional[str] = None,
force_password_change: Optional[bool] = None,
disable_password_expiration: Optional[bool] = None,
company_name: Optional[str] = None,
job_title: Optional[str] = None,
cost_center: Optional[str] = None,
country: Optional[str] = None,
department: Optional[str] = None,
mail: Optional[str] = None,
disable_strong_password: Optional[bool] = None,
business_phones: Optional[Sequence[str]] = None,
division: Optional[str] = None,
employee_id: Optional[str] = None,
employee_type: Optional[str] = None,
mail_nickname: Optional[str] = None,
account_enabled: Optional[bool] = None,
given_name: Optional[str] = None,
consent_provided_for_minor: Optional[str] = None,
city: Optional[str] = None,
fax_number: Optional[str] = None,
manager_id: Optional[str] = None,
mobile_phone: Optional[str] = None,
office_location: Optional[str] = None,
onpremises_immutable_id: Optional[str] = None,
other_mails: Optional[Sequence[str]] = None,
password: Optional[str] = None,
postal_code: Optional[str] = None,
preferred_language: Optional[str] = None,
show_in_address_list: Optional[bool] = None,
state: Optional[str] = None,
street_address: Optional[str] = None,
surname: Optional[str] = None,
usage_location: Optional[str] = None,
age_group: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: azuread:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var userResource = new AzureAD.User("userResource", new()
{
DisplayName = "string",
UserPrincipalName = "string",
ForcePasswordChange = false,
DisablePasswordExpiration = false,
CompanyName = "string",
JobTitle = "string",
CostCenter = "string",
Country = "string",
Department = "string",
Mail = "string",
DisableStrongPassword = false,
BusinessPhones = new[]
{
"string",
},
Division = "string",
EmployeeId = "string",
EmployeeType = "string",
MailNickname = "string",
AccountEnabled = false,
GivenName = "string",
ConsentProvidedForMinor = "string",
City = "string",
FaxNumber = "string",
ManagerId = "string",
MobilePhone = "string",
OfficeLocation = "string",
OnpremisesImmutableId = "string",
OtherMails = new[]
{
"string",
},
Password = "string",
PostalCode = "string",
PreferredLanguage = "string",
ShowInAddressList = false,
State = "string",
StreetAddress = "string",
Surname = "string",
UsageLocation = "string",
AgeGroup = "string",
});
example, err := azuread.NewUser(ctx, "userResource", &azuread.UserArgs{
DisplayName: pulumi.String("string"),
UserPrincipalName: pulumi.String("string"),
ForcePasswordChange: pulumi.Bool(false),
DisablePasswordExpiration: pulumi.Bool(false),
CompanyName: pulumi.String("string"),
JobTitle: pulumi.String("string"),
CostCenter: pulumi.String("string"),
Country: pulumi.String("string"),
Department: pulumi.String("string"),
Mail: pulumi.String("string"),
DisableStrongPassword: pulumi.Bool(false),
BusinessPhones: pulumi.StringArray{
pulumi.String("string"),
},
Division: pulumi.String("string"),
EmployeeId: pulumi.String("string"),
EmployeeType: pulumi.String("string"),
MailNickname: pulumi.String("string"),
AccountEnabled: pulumi.Bool(false),
GivenName: pulumi.String("string"),
ConsentProvidedForMinor: pulumi.String("string"),
City: pulumi.String("string"),
FaxNumber: pulumi.String("string"),
ManagerId: pulumi.String("string"),
MobilePhone: pulumi.String("string"),
OfficeLocation: pulumi.String("string"),
OnpremisesImmutableId: pulumi.String("string"),
OtherMails: pulumi.StringArray{
pulumi.String("string"),
},
Password: pulumi.String("string"),
PostalCode: pulumi.String("string"),
PreferredLanguage: pulumi.String("string"),
ShowInAddressList: pulumi.Bool(false),
State: pulumi.String("string"),
StreetAddress: pulumi.String("string"),
Surname: pulumi.String("string"),
UsageLocation: pulumi.String("string"),
AgeGroup: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
.displayName("string")
.userPrincipalName("string")
.forcePasswordChange(false)
.disablePasswordExpiration(false)
.companyName("string")
.jobTitle("string")
.costCenter("string")
.country("string")
.department("string")
.mail("string")
.disableStrongPassword(false)
.businessPhones("string")
.division("string")
.employeeId("string")
.employeeType("string")
.mailNickname("string")
.accountEnabled(false)
.givenName("string")
.consentProvidedForMinor("string")
.city("string")
.faxNumber("string")
.managerId("string")
.mobilePhone("string")
.officeLocation("string")
.onpremisesImmutableId("string")
.otherMails("string")
.password("string")
.postalCode("string")
.preferredLanguage("string")
.showInAddressList(false)
.state("string")
.streetAddress("string")
.surname("string")
.usageLocation("string")
.ageGroup("string")
.build());
user_resource = azuread.User("userResource",
display_name="string",
user_principal_name="string",
force_password_change=False,
disable_password_expiration=False,
company_name="string",
job_title="string",
cost_center="string",
country="string",
department="string",
mail="string",
disable_strong_password=False,
business_phones=["string"],
division="string",
employee_id="string",
employee_type="string",
mail_nickname="string",
account_enabled=False,
given_name="string",
consent_provided_for_minor="string",
city="string",
fax_number="string",
manager_id="string",
mobile_phone="string",
office_location="string",
onpremises_immutable_id="string",
other_mails=["string"],
password="string",
postal_code="string",
preferred_language="string",
show_in_address_list=False,
state="string",
street_address="string",
surname="string",
usage_location="string",
age_group="string")
const userResource = new azuread.User("userResource", {
displayName: "string",
userPrincipalName: "string",
forcePasswordChange: false,
disablePasswordExpiration: false,
companyName: "string",
jobTitle: "string",
costCenter: "string",
country: "string",
department: "string",
mail: "string",
disableStrongPassword: false,
businessPhones: ["string"],
division: "string",
employeeId: "string",
employeeType: "string",
mailNickname: "string",
accountEnabled: false,
givenName: "string",
consentProvidedForMinor: "string",
city: "string",
faxNumber: "string",
managerId: "string",
mobilePhone: "string",
officeLocation: "string",
onpremisesImmutableId: "string",
otherMails: ["string"],
password: "string",
postalCode: "string",
preferredLanguage: "string",
showInAddressList: false,
state: "string",
streetAddress: "string",
surname: "string",
usageLocation: "string",
ageGroup: "string",
});
type: azuread:User
properties:
accountEnabled: false
ageGroup: string
businessPhones:
- string
city: string
companyName: string
consentProvidedForMinor: string
costCenter: string
country: string
department: string
disablePasswordExpiration: false
disableStrongPassword: false
displayName: string
division: string
employeeId: string
employeeType: string
faxNumber: string
forcePasswordChange: false
givenName: string
jobTitle: string
mail: string
mailNickname: string
managerId: string
mobilePhone: string
officeLocation: string
onpremisesImmutableId: string
otherMails:
- string
password: string
postalCode: string
preferredLanguage: string
showInAddressList: false
state: string
streetAddress: string
surname: string
usageLocation: string
userPrincipalName: string
User Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The User resource accepts the following input properties:
- Display
Name string - The name to display in the address book for the user.
- User
Principal stringName - The user principal name (UPN) of the user.
- Account
Enabled bool - Whether or not the account should be enabled.
- Age
Group string - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - Business
Phones List<string> - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- City string
- The city in which the user is located.
- Company
Name string - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- Consent
Provided stringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - Cost
Center string - The cost center associated with the user.
- Country string
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - Department string
- The name for the department in which the user works.
- Disable
Password boolExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - Disable
Strong boolPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - Division string
- The name of the division in which the user works.
- Employee
Id string - The employee identifier assigned to the user by the organisation.
- Employee
Type string - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- Fax
Number string - The fax number of the user.
- Force
Password boolChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - Given
Name string - The given name (first name) of the user.
- Job
Title string - The user’s job title.
- Mail string
- The SMTP address for the user. This property cannot be unset once specified.
- Mail
Nickname string - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- Manager
Id string - The object ID of the user's manager.
- Mobile
Phone string - The primary cellular telephone number for the user.
- Office
Location string - The office location in the user's place of business.
- Onpremises
Immutable stringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - Other
Mails List<string> - A list of additional email addresses for the user.
- Password string
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- Postal
Code string - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- Preferred
Language string - The user's preferred language, in ISO 639-1 notation.
- Show
In boolAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - State string
- The state or province in the user's address.
- Street
Address string - The street address of the user's place of business.
- Surname string
- The user's surname (family name or last name).
- Usage
Location string - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set.
- Display
Name string - The name to display in the address book for the user.
- User
Principal stringName - The user principal name (UPN) of the user.
- Account
Enabled bool - Whether or not the account should be enabled.
- Age
Group string - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - Business
Phones []string - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- City string
- The city in which the user is located.
- Company
Name string - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- Consent
Provided stringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - Cost
Center string - The cost center associated with the user.
- Country string
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - Department string
- The name for the department in which the user works.
- Disable
Password boolExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - Disable
Strong boolPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - Division string
- The name of the division in which the user works.
- Employee
Id string - The employee identifier assigned to the user by the organisation.
- Employee
Type string - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- Fax
Number string - The fax number of the user.
- Force
Password boolChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - Given
Name string - The given name (first name) of the user.
- Job
Title string - The user’s job title.
- Mail string
- The SMTP address for the user. This property cannot be unset once specified.
- Mail
Nickname string - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- Manager
Id string - The object ID of the user's manager.
- Mobile
Phone string - The primary cellular telephone number for the user.
- Office
Location string - The office location in the user's place of business.
- Onpremises
Immutable stringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - Other
Mails []string - A list of additional email addresses for the user.
- Password string
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- Postal
Code string - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- Preferred
Language string - The user's preferred language, in ISO 639-1 notation.
- Show
In boolAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - State string
- The state or province in the user's address.
- Street
Address string - The street address of the user's place of business.
- Surname string
- The user's surname (family name or last name).
- Usage
Location string - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set.
- display
Name String - The name to display in the address book for the user.
- user
Principal StringName - The user principal name (UPN) of the user.
- account
Enabled Boolean - Whether or not the account should be enabled.
- age
Group String - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business
Phones List<String> - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city String
- The city in which the user is located.
- company
Name String - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent
Provided StringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost
Center String - The cost center associated with the user.
- country String
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - department String
- The name for the department in which the user works.
- disable
Password BooleanExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable
Strong BooleanPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - division String
- The name of the division in which the user works.
- employee
Id String - The employee identifier assigned to the user by the organisation.
- employee
Type String - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- fax
Number String - The fax number of the user.
- force
Password BooleanChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given
Name String - The given name (first name) of the user.
- job
Title String - The user’s job title.
- mail String
- The SMTP address for the user. This property cannot be unset once specified.
- mail
Nickname String - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager
Id String - The object ID of the user's manager.
- mobile
Phone String - The primary cellular telephone number for the user.
- office
Location String - The office location in the user's place of business.
- onpremises
Immutable StringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - other
Mails List<String> - A list of additional email addresses for the user.
- password String
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal
Code String - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred
Language String - The user's preferred language, in ISO 639-1 notation.
- show
In BooleanAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state String
- The state or province in the user's address.
- street
Address String - The street address of the user's place of business.
- surname String
- The user's surname (family name or last name).
- usage
Location String - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set.
- display
Name string - The name to display in the address book for the user.
- user
Principal stringName - The user principal name (UPN) of the user.
- account
Enabled boolean - Whether or not the account should be enabled.
- age
Group string - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business
Phones string[] - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city string
- The city in which the user is located.
- company
Name string - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent
Provided stringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost
Center string - The cost center associated with the user.
- country string
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - department string
- The name for the department in which the user works.
- disable
Password booleanExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable
Strong booleanPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - division string
- The name of the division in which the user works.
- employee
Id string - The employee identifier assigned to the user by the organisation.
- employee
Type string - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- fax
Number string - The fax number of the user.
- force
Password booleanChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given
Name string - The given name (first name) of the user.
- job
Title string - The user’s job title.
- mail string
- The SMTP address for the user. This property cannot be unset once specified.
- mail
Nickname string - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager
Id string - The object ID of the user's manager.
- mobile
Phone string - The primary cellular telephone number for the user.
- office
Location string - The office location in the user's place of business.
- onpremises
Immutable stringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - other
Mails string[] - A list of additional email addresses for the user.
- password string
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal
Code string - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred
Language string - The user's preferred language, in ISO 639-1 notation.
- show
In booleanAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state string
- The state or province in the user's address.
- street
Address string - The street address of the user's place of business.
- surname string
- The user's surname (family name or last name).
- usage
Location string - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set.
- display_
name str - The name to display in the address book for the user.
- user_
principal_ strname - The user principal name (UPN) of the user.
- account_
enabled bool - Whether or not the account should be enabled.
- age_
group str - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business_
phones Sequence[str] - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city str
- The city in which the user is located.
- company_
name str - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent_
provided_ strfor_ minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost_
center str - The cost center associated with the user.
- country str
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - department str
- The name for the department in which the user works.
- disable_
password_ boolexpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable_
strong_ boolpassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - division str
- The name of the division in which the user works.
- employee_
id str - The employee identifier assigned to the user by the organisation.
- employee_
type str - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- fax_
number str - The fax number of the user.
- force_
password_ boolchange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given_
name str - The given name (first name) of the user.
- job_
title str - The user’s job title.
- mail str
- The SMTP address for the user. This property cannot be unset once specified.
- mail_
nickname str - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager_
id str - The object ID of the user's manager.
- mobile_
phone str - The primary cellular telephone number for the user.
- office_
location str - The office location in the user's place of business.
- onpremises_
immutable_ strid - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - other_
mails Sequence[str] - A list of additional email addresses for the user.
- password str
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal_
code str - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred_
language str - The user's preferred language, in ISO 639-1 notation.
- show_
in_ booladdress_ list - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state str
- The state or province in the user's address.
- street_
address str - The street address of the user's place of business.
- surname str
- The user's surname (family name or last name).
- usage_
location str - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set.
- display
Name String - The name to display in the address book for the user.
- user
Principal StringName - The user principal name (UPN) of the user.
- account
Enabled Boolean - Whether or not the account should be enabled.
- age
Group String - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business
Phones List<String> - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city String
- The city in which the user is located.
- company
Name String - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent
Provided StringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost
Center String - The cost center associated with the user.
- country String
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - department String
- The name for the department in which the user works.
- disable
Password BooleanExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable
Strong BooleanPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - division String
- The name of the division in which the user works.
- employee
Id String - The employee identifier assigned to the user by the organisation.
- employee
Type String - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- fax
Number String - The fax number of the user.
- force
Password BooleanChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given
Name String - The given name (first name) of the user.
- job
Title String - The user’s job title.
- mail String
- The SMTP address for the user. This property cannot be unset once specified.
- mail
Nickname String - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager
Id String - The object ID of the user's manager.
- mobile
Phone String - The primary cellular telephone number for the user.
- office
Location String - The office location in the user's place of business.
- onpremises
Immutable StringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - other
Mails List<String> - A list of additional email addresses for the user.
- password String
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal
Code String - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred
Language String - The user's preferred language, in ISO 639-1 notation.
- show
In BooleanAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state String
- The state or province in the user's address.
- street
Address String - The street address of the user's place of business.
- surname String
- The user's surname (family name or last name).
- usage
Location String - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- About
Me string - A freeform field for the user to describe themselves
- Creation
Type string - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - External
User stringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - Id string
- The provider-assigned unique ID for this managed resource.
- Im
Addresses List<string> - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- Object
Id string - The object ID of the user.
- Onpremises
Distinguished stringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Domain stringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Sam stringAccount Name - The on-premise SAM account name of the user.
- Onpremises
Security stringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Sync boolEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - Onpremises
User stringPrincipal Name - The on-premise user principal name of the user.
- Proxy
Addresses List<string> - List of email addresses for the user that direct to the same mailbox.
- User
Type string - The user type in the directory. Possible values are
Guest
orMember
.
- About
Me string - A freeform field for the user to describe themselves
- Creation
Type string - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - External
User stringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - Id string
- The provider-assigned unique ID for this managed resource.
- Im
Addresses []string - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- Object
Id string - The object ID of the user.
- Onpremises
Distinguished stringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Domain stringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Sam stringAccount Name - The on-premise SAM account name of the user.
- Onpremises
Security stringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Sync boolEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - Onpremises
User stringPrincipal Name - The on-premise user principal name of the user.
- Proxy
Addresses []string - List of email addresses for the user that direct to the same mailbox.
- User
Type string - The user type in the directory. Possible values are
Guest
orMember
.
- about
Me String - A freeform field for the user to describe themselves
- creation
Type String - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - external
User StringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - id String
- The provider-assigned unique ID for this managed resource.
- im
Addresses List<String> - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- object
Id String - The object ID of the user.
- onpremises
Distinguished StringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Domain StringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sam StringAccount Name - The on-premise SAM account name of the user.
- onpremises
Security StringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sync BooleanEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises
User StringPrincipal Name - The on-premise user principal name of the user.
- proxy
Addresses List<String> - List of email addresses for the user that direct to the same mailbox.
- user
Type String - The user type in the directory. Possible values are
Guest
orMember
.
- about
Me string - A freeform field for the user to describe themselves
- creation
Type string - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - external
User stringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - id string
- The provider-assigned unique ID for this managed resource.
- im
Addresses string[] - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- object
Id string - The object ID of the user.
- onpremises
Distinguished stringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Domain stringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sam stringAccount Name - The on-premise SAM account name of the user.
- onpremises
Security stringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sync booleanEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises
User stringPrincipal Name - The on-premise user principal name of the user.
- proxy
Addresses string[] - List of email addresses for the user that direct to the same mailbox.
- user
Type string - The user type in the directory. Possible values are
Guest
orMember
.
- about_
me str - A freeform field for the user to describe themselves
- creation_
type str - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - external_
user_ strstate - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - id str
- The provider-assigned unique ID for this managed resource.
- im_
addresses Sequence[str] - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- object_
id str - The object ID of the user.
- onpremises_
distinguished_ strname - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises_
domain_ strname - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises_
sam_ straccount_ name - The on-premise SAM account name of the user.
- onpremises_
security_ stridentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises_
sync_ boolenabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises_
user_ strprincipal_ name - The on-premise user principal name of the user.
- proxy_
addresses Sequence[str] - List of email addresses for the user that direct to the same mailbox.
- user_
type str - The user type in the directory. Possible values are
Guest
orMember
.
- about
Me String - A freeform field for the user to describe themselves
- creation
Type String - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - external
User StringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - id String
- The provider-assigned unique ID for this managed resource.
- im
Addresses List<String> - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- object
Id String - The object ID of the user.
- onpremises
Distinguished StringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Domain StringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sam StringAccount Name - The on-premise SAM account name of the user.
- onpremises
Security StringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sync BooleanEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises
User StringPrincipal Name - The on-premise user principal name of the user.
- proxy
Addresses List<String> - List of email addresses for the user that direct to the same mailbox.
- user
Type String - The user type in the directory. Possible values are
Guest
orMember
.
Look up Existing User Resource
Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
about_me: Optional[str] = None,
account_enabled: Optional[bool] = None,
age_group: Optional[str] = None,
business_phones: Optional[Sequence[str]] = None,
city: Optional[str] = None,
company_name: Optional[str] = None,
consent_provided_for_minor: Optional[str] = None,
cost_center: Optional[str] = None,
country: Optional[str] = None,
creation_type: Optional[str] = None,
department: Optional[str] = None,
disable_password_expiration: Optional[bool] = None,
disable_strong_password: Optional[bool] = None,
display_name: Optional[str] = None,
division: Optional[str] = None,
employee_id: Optional[str] = None,
employee_type: Optional[str] = None,
external_user_state: Optional[str] = None,
fax_number: Optional[str] = None,
force_password_change: Optional[bool] = None,
given_name: Optional[str] = None,
im_addresses: Optional[Sequence[str]] = None,
job_title: Optional[str] = None,
mail: Optional[str] = None,
mail_nickname: Optional[str] = None,
manager_id: Optional[str] = None,
mobile_phone: Optional[str] = None,
object_id: Optional[str] = None,
office_location: Optional[str] = None,
onpremises_distinguished_name: Optional[str] = None,
onpremises_domain_name: Optional[str] = None,
onpremises_immutable_id: Optional[str] = None,
onpremises_sam_account_name: Optional[str] = None,
onpremises_security_identifier: Optional[str] = None,
onpremises_sync_enabled: Optional[bool] = None,
onpremises_user_principal_name: Optional[str] = None,
other_mails: Optional[Sequence[str]] = None,
password: Optional[str] = None,
postal_code: Optional[str] = None,
preferred_language: Optional[str] = None,
proxy_addresses: Optional[Sequence[str]] = None,
show_in_address_list: Optional[bool] = None,
state: Optional[str] = None,
street_address: Optional[str] = None,
surname: Optional[str] = None,
usage_location: Optional[str] = None,
user_principal_name: Optional[str] = None,
user_type: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- About
Me string - A freeform field for the user to describe themselves
- Account
Enabled bool - Whether or not the account should be enabled.
- Age
Group string - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - Business
Phones List<string> - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- City string
- The city in which the user is located.
- Company
Name string - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- Consent
Provided stringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - Cost
Center string - The cost center associated with the user.
- Country string
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - Creation
Type string - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - Department string
- The name for the department in which the user works.
- Disable
Password boolExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - Disable
Strong boolPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - Display
Name string - The name to display in the address book for the user.
- Division string
- The name of the division in which the user works.
- Employee
Id string - The employee identifier assigned to the user by the organisation.
- Employee
Type string - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- External
User stringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - Fax
Number string - The fax number of the user.
- Force
Password boolChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - Given
Name string - The given name (first name) of the user.
- Im
Addresses List<string> - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- Job
Title string - The user’s job title.
- Mail string
- The SMTP address for the user. This property cannot be unset once specified.
- Mail
Nickname string - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- Manager
Id string - The object ID of the user's manager.
- Mobile
Phone string - The primary cellular telephone number for the user.
- Object
Id string - The object ID of the user.
- Office
Location string - The office location in the user's place of business.
- Onpremises
Distinguished stringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Domain stringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Immutable stringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - Onpremises
Sam stringAccount Name - The on-premise SAM account name of the user.
- Onpremises
Security stringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Sync boolEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - Onpremises
User stringPrincipal Name - The on-premise user principal name of the user.
- Other
Mails List<string> - A list of additional email addresses for the user.
- Password string
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- Postal
Code string - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- Preferred
Language string - The user's preferred language, in ISO 639-1 notation.
- Proxy
Addresses List<string> - List of email addresses for the user that direct to the same mailbox.
- Show
In boolAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - State string
- The state or province in the user's address.
- Street
Address string - The street address of the user's place of business.
- Surname string
- The user's surname (family name or last name).
- Usage
Location string - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set. - User
Principal stringName - The user principal name (UPN) of the user.
- User
Type string - The user type in the directory. Possible values are
Guest
orMember
.
- About
Me string - A freeform field for the user to describe themselves
- Account
Enabled bool - Whether or not the account should be enabled.
- Age
Group string - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - Business
Phones []string - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- City string
- The city in which the user is located.
- Company
Name string - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- Consent
Provided stringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - Cost
Center string - The cost center associated with the user.
- Country string
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - Creation
Type string - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - Department string
- The name for the department in which the user works.
- Disable
Password boolExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - Disable
Strong boolPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - Display
Name string - The name to display in the address book for the user.
- Division string
- The name of the division in which the user works.
- Employee
Id string - The employee identifier assigned to the user by the organisation.
- Employee
Type string - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- External
User stringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - Fax
Number string - The fax number of the user.
- Force
Password boolChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - Given
Name string - The given name (first name) of the user.
- Im
Addresses []string - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- Job
Title string - The user’s job title.
- Mail string
- The SMTP address for the user. This property cannot be unset once specified.
- Mail
Nickname string - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- Manager
Id string - The object ID of the user's manager.
- Mobile
Phone string - The primary cellular telephone number for the user.
- Object
Id string - The object ID of the user.
- Office
Location string - The office location in the user's place of business.
- Onpremises
Distinguished stringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Domain stringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Immutable stringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - Onpremises
Sam stringAccount Name - The on-premise SAM account name of the user.
- Onpremises
Security stringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- Onpremises
Sync boolEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - Onpremises
User stringPrincipal Name - The on-premise user principal name of the user.
- Other
Mails []string - A list of additional email addresses for the user.
- Password string
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- Postal
Code string - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- Preferred
Language string - The user's preferred language, in ISO 639-1 notation.
- Proxy
Addresses []string - List of email addresses for the user that direct to the same mailbox.
- Show
In boolAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - State string
- The state or province in the user's address.
- Street
Address string - The street address of the user's place of business.
- Surname string
- The user's surname (family name or last name).
- Usage
Location string - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set. - User
Principal stringName - The user principal name (UPN) of the user.
- User
Type string - The user type in the directory. Possible values are
Guest
orMember
.
- about
Me String - A freeform field for the user to describe themselves
- account
Enabled Boolean - Whether or not the account should be enabled.
- age
Group String - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business
Phones List<String> - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city String
- The city in which the user is located.
- company
Name String - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent
Provided StringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost
Center String - The cost center associated with the user.
- country String
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - creation
Type String - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - department String
- The name for the department in which the user works.
- disable
Password BooleanExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable
Strong BooleanPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - display
Name String - The name to display in the address book for the user.
- division String
- The name of the division in which the user works.
- employee
Id String - The employee identifier assigned to the user by the organisation.
- employee
Type String - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- external
User StringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - fax
Number String - The fax number of the user.
- force
Password BooleanChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given
Name String - The given name (first name) of the user.
- im
Addresses List<String> - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- job
Title String - The user’s job title.
- mail String
- The SMTP address for the user. This property cannot be unset once specified.
- mail
Nickname String - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager
Id String - The object ID of the user's manager.
- mobile
Phone String - The primary cellular telephone number for the user.
- object
Id String - The object ID of the user.
- office
Location String - The office location in the user's place of business.
- onpremises
Distinguished StringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Domain StringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Immutable StringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - onpremises
Sam StringAccount Name - The on-premise SAM account name of the user.
- onpremises
Security StringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sync BooleanEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises
User StringPrincipal Name - The on-premise user principal name of the user.
- other
Mails List<String> - A list of additional email addresses for the user.
- password String
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal
Code String - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred
Language String - The user's preferred language, in ISO 639-1 notation.
- proxy
Addresses List<String> - List of email addresses for the user that direct to the same mailbox.
- show
In BooleanAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state String
- The state or province in the user's address.
- street
Address String - The street address of the user's place of business.
- surname String
- The user's surname (family name or last name).
- usage
Location String - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set. - user
Principal StringName - The user principal name (UPN) of the user.
- user
Type String - The user type in the directory. Possible values are
Guest
orMember
.
- about
Me string - A freeform field for the user to describe themselves
- account
Enabled boolean - Whether or not the account should be enabled.
- age
Group string - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business
Phones string[] - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city string
- The city in which the user is located.
- company
Name string - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent
Provided stringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost
Center string - The cost center associated with the user.
- country string
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - creation
Type string - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - department string
- The name for the department in which the user works.
- disable
Password booleanExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable
Strong booleanPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - display
Name string - The name to display in the address book for the user.
- division string
- The name of the division in which the user works.
- employee
Id string - The employee identifier assigned to the user by the organisation.
- employee
Type string - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- external
User stringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - fax
Number string - The fax number of the user.
- force
Password booleanChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given
Name string - The given name (first name) of the user.
- im
Addresses string[] - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- job
Title string - The user’s job title.
- mail string
- The SMTP address for the user. This property cannot be unset once specified.
- mail
Nickname string - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager
Id string - The object ID of the user's manager.
- mobile
Phone string - The primary cellular telephone number for the user.
- object
Id string - The object ID of the user.
- office
Location string - The office location in the user's place of business.
- onpremises
Distinguished stringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Domain stringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Immutable stringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - onpremises
Sam stringAccount Name - The on-premise SAM account name of the user.
- onpremises
Security stringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sync booleanEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises
User stringPrincipal Name - The on-premise user principal name of the user.
- other
Mails string[] - A list of additional email addresses for the user.
- password string
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal
Code string - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred
Language string - The user's preferred language, in ISO 639-1 notation.
- proxy
Addresses string[] - List of email addresses for the user that direct to the same mailbox.
- show
In booleanAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state string
- The state or province in the user's address.
- street
Address string - The street address of the user's place of business.
- surname string
- The user's surname (family name or last name).
- usage
Location string - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set. - user
Principal stringName - The user principal name (UPN) of the user.
- user
Type string - The user type in the directory. Possible values are
Guest
orMember
.
- about_
me str - A freeform field for the user to describe themselves
- account_
enabled bool - Whether or not the account should be enabled.
- age_
group str - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business_
phones Sequence[str] - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city str
- The city in which the user is located.
- company_
name str - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent_
provided_ strfor_ minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost_
center str - The cost center associated with the user.
- country str
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - creation_
type str - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - department str
- The name for the department in which the user works.
- disable_
password_ boolexpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable_
strong_ boolpassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - display_
name str - The name to display in the address book for the user.
- division str
- The name of the division in which the user works.
- employee_
id str - The employee identifier assigned to the user by the organisation.
- employee_
type str - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- external_
user_ strstate - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - fax_
number str - The fax number of the user.
- force_
password_ boolchange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given_
name str - The given name (first name) of the user.
- im_
addresses Sequence[str] - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- job_
title str - The user’s job title.
- mail str
- The SMTP address for the user. This property cannot be unset once specified.
- mail_
nickname str - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager_
id str - The object ID of the user's manager.
- mobile_
phone str - The primary cellular telephone number for the user.
- object_
id str - The object ID of the user.
- office_
location str - The office location in the user's place of business.
- onpremises_
distinguished_ strname - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises_
domain_ strname - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises_
immutable_ strid - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - onpremises_
sam_ straccount_ name - The on-premise SAM account name of the user.
- onpremises_
security_ stridentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises_
sync_ boolenabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises_
user_ strprincipal_ name - The on-premise user principal name of the user.
- other_
mails Sequence[str] - A list of additional email addresses for the user.
- password str
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal_
code str - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred_
language str - The user's preferred language, in ISO 639-1 notation.
- proxy_
addresses Sequence[str] - List of email addresses for the user that direct to the same mailbox.
- show_
in_ booladdress_ list - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state str
- The state or province in the user's address.
- street_
address str - The street address of the user's place of business.
- surname str
- The user's surname (family name or last name).
- usage_
location str - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set. - user_
principal_ strname - The user principal name (UPN) of the user.
- user_
type str - The user type in the directory. Possible values are
Guest
orMember
.
- about
Me String - A freeform field for the user to describe themselves
- account
Enabled Boolean - Whether or not the account should be enabled.
- age
Group String - The age group of the user. Supported values are
Adult
,NotAdult
andMinor
. Omit this property or specify a blank string to unset. - business
Phones List<String> - A list of telephone numbers for the user. Only one number can be set for this property. Read-only for users synced with Azure AD Connect.
- city String
- The city in which the user is located.
- company
Name String - The company name which the user is associated. This property can be useful for describing the company that an external user comes from.
- consent
Provided StringFor Minor - Whether consent has been obtained for minors. Supported values are
Granted
,Denied
andNotRequired
. Omit this property or specify a blank string to unset. - cost
Center String - The cost center associated with the user.
- country String
- The country/region in which the user is located. Examples include:
NO
,JP
, andGB
. - creation
Type String - Indicates whether the user account was created as a regular school or work account (
null
), an external account (Invitation
), a local account for an Azure Active Directory B2C tenant (LocalAccount
) or self-service sign-up using email verification (EmailVerified
). - department String
- The name for the department in which the user works.
- disable
Password BooleanExpiration - Whether the user's password is exempt from expiring. Defaults to
false
. - disable
Strong BooleanPassword - Whether the user is allowed weaker passwords than the default policy to be specified. Defaults to
false
. - display
Name String - The name to display in the address book for the user.
- division String
- The name of the division in which the user works.
- employee
Id String - The employee identifier assigned to the user by the organisation.
- employee
Type String - Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor.
- external
User StringState - For an external user invited to the tenant, this property represents the invited user's invitation status. Possible values are
PendingAcceptance
orAccepted
. - fax
Number String - The fax number of the user.
- force
Password BooleanChange - Whether the user is forced to change the password during the next sign-in. Only takes effect when also changing the password. Defaults to
false
. - given
Name String - The given name (first name) of the user.
- im
Addresses List<String> - A list of instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user.
- job
Title String - The user’s job title.
- mail String
- The SMTP address for the user. This property cannot be unset once specified.
- mail
Nickname String - The mail alias for the user. Defaults to the user name part of the user principal name (UPN).
- manager
Id String - The object ID of the user's manager.
- mobile
Phone String - The primary cellular telephone number for the user.
- object
Id String - The object ID of the user.
- office
Location String - The office location in the user's place of business.
- onpremises
Distinguished StringName - The on-premises distinguished name (DN) of the user, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Domain StringName - The on-premises FQDN, also called dnsDomainName, synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Immutable StringId - The value used to associate an on-premise Active Directory user account with their Azure AD user object. This must be specified if you are using a federated domain for the user's
user_principal_name
property when creating a new user account. - onpremises
Sam StringAccount Name - The on-premise SAM account name of the user.
- onpremises
Security StringIdentifier - The on-premises security identifier (SID), synchronised from the on-premises directory when Azure AD Connect is used.
- onpremises
Sync BooleanEnabled - Whether this user is synchronised from an on-premises directory (
true
), no longer synchronised (false
), or has never been synchronised (null
). - onpremises
User StringPrincipal Name - The on-premise user principal name of the user.
- other
Mails List<String> - A list of additional email addresses for the user.
- password String
- The password for the user. The password must satisfy minimum requirements as specified by the password policy. The maximum length is 256 characters. This property is required when creating a new user
- postal
Code String - The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
- preferred
Language String - The user's preferred language, in ISO 639-1 notation.
- proxy
Addresses List<String> - List of email addresses for the user that direct to the same mailbox.
- show
In BooleanAddress List - Whether or not the Outlook global address list should include this user. Defaults to
true
. - state String
- The state or province in the user's address.
- street
Address String - The street address of the user's place of business.
- surname String
- The user's surname (family name or last name).
- usage
Location String - The usage location of the user. Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. The usage location is a two letter country code (ISO standard 3166). Examples include:
NO
,JP
, andGB
. Cannot be reset to null once set. - user
Principal StringName - The user principal name (UPN) of the user.
- user
Type String - The user type in the directory. Possible values are
Guest
orMember
.
Import
Users can be imported using their object ID, e.g.
$ pulumi import azuread:index/user:User my_user 00000000-0000-0000-0000-000000000000
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Active Directory (Azure AD) pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuread
Terraform Provider.