Create Cloud User

Create a cloud user in Office 365.

Unless otherwise indicated, field types are text.

Input

  • User

    • On Premises Immutable Id: Property is used to associate an on-premises Active Directory user account to their Azure AD user object. If you are using a federated domain for the user's userPrincipalName (UPN) property, then you must specifiy this property as you create a new user account in the Graph.

    • Account Enabled (true/false): true if the account is enabled; otherwise, false.

    • Display Name: The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial and last name.

    • Force Change Password Next Sign In (true/false): true if the user must change their password on the next login; otherwise false.

    • Mail Nickname: The mail alias for the user. Note: This field must not contain a space.

    • Password: The password for the user. Required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required.

    • User Principal Name: User principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains.

    • Age Group: The age group of the user. Allowed values: null, minor, notAdult, and adult.

    • Assigned Licenses (list of objects): Licenses that are assigned to the user

    • Business Phones (list of text): Telephone numbers for the user. Note: Although this is a string collection, only one number can be set for this property.

    • City: The city in which the user is located.

    • Company Name: The company name which the user is associated.

    • Consent Provided For Minor: Indicates whether consent has been obtained for minors. Allowed values: null, granted, denied and notRequired.

    • Country: The country or region in which the user is located; for example, US or UK

    • Department: The name for the department in which the user works.

    • Employee Id: Employee identifier assigned to the user by the organization.

    • Fax Number: Fax number of the user.

    • Given Name: Given (first) name of the user.

    • Is Resource Account (true/false): true if the user is a resource account; otherwise, false. null value should be considered false.

    • Job Title: The user's job title.

    • Mobile Phone: The primary cellular telephone number for the user.

    • Office Location: The office location in the user's place of business.

    • Other Mails: List of additional email addresses for the user

    • Password Policies: Specifies password policies for the user. This value is an enumeration with one possible value being DisableStrongPassword, which allows weaker passwords than the default policy to be specified. DisablePasswordExpiration can also be specified. The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword.

    • Force Change Password Next Sign In With MFA (true/false): If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false.

    • Postal Code: The postal code for the user's postal address. The postal code is specific to the user's country or region. In the United States of America, this attribute contains the ZIP code.

    • Preferred Data Location: Preferred data location for the user.

    • Preferred Language: Preferred language for the user. Should follow ISO 639-1 Code; for example en-US.

    • Show In Address List (true/false): true if the Outlook global address list should contain this user, otherwise false. If not set, this will be treated as true. For users invited through the invitation manager, this property will be set to false.

    • State: The state or province in the user's address.

    • Street Address: The street address of the user's place of business.

    • Surname: The user's surname (family name or last name).

    • Usage Location (2 char): Two letter country code (ISO standard 3166). Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. Examples include: US, JP, and GB.

    • User Type: A string value that can be used to classify user types in your directory, such as Member and Guest.

  • On Premises Extension Attributes: Extension attributes 1-15 for the user. Note that the individual extension attributes are neither selectable nor filterable. For an onPremisesSyncEnabled user, this set of properties is mastered on-premises and is read-only. For a cloud-only user (where onPremisesSyncEnabled is false), these properties may be set during creation or update.

    • Extension Attribute 1: First customizable extension attribute

    • Extension Attribute 2: Second customizable extension attribute

    • Extension Attribute 3: Third customizable extension attribute

    • Extension Attribute 4: Fourth customizable extension attribute

    • Extension Attribute 5: Fifth customizable extension attribute

    • Extension Attribute 6: Sixth customizable extension attribute

    • Extension Attribute 7: Seventh customizable extension attribute

    • Extension Attribute 8: Eighth customizable extension attribute

    • Extension Attribute 9: Ninth customizable extension attribute

    • Extension Attribute 10: Tenth customizable extension attribute

    • Extension Attribute 11: Eleventh customizable extension attribute

    • Extension Attribute 12: Twelfth customizable extension attribute

    • Extension Attribute 13: Thirteenth customizable extension attribute

    • Extension Attribute 14: Fourteenth customizable extension attribute

    • Extension Attribute 15: Fifteenth customizable extension attribute

Output

  • User

    • Id: Unique identifier for the user.

    • Business Phones (list of text): Telephone numbers for the user. Note: Although this is a string collection, only one number can be set for this property.

    • Display Name: The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial and last name.

    • Given Name: The given (first) name of the user.

    • Job Title: The user's job title.

    • Mail: The SMTP address for the user. For example, jeff@contoso.onmicrosoft.com.

    • Mobile Phone: The primary cellular telephone number for the user.

    • Office Location: The office location in the user's place of business.

    • Preferred Language: Preferred language for the user. Should follow ISO 639-1 Code; for example en-US.

    • Surname: The user's surname (family name or last name).

    • User Principal Name: Principal name (also known as Username or UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains.

See also