Hosted Active Directory::CreateUser
The CreateUser method creates a user based on the provided plan type. The method can also perform the following optional tasks:
Set the user's password.
Make the user an administrator of the organization.
Arguments
Input Arguments | Required | Description |
---|---|---|
<container> |
Yes |
The Lightweight Directory Access Protocol (LDAP) of the container in which the new Contact is to be created. |
<userPrincipalName> |
Yes |
The user Principal Name (user@domain.com). |
<preferredDomainController> |
Yes |
The name of the preferred domain controller. |
<isAdmin> |
Yes |
A Boolean value. Set this element to 1 if you want the new user to be an administrator of the organization; otherwise set to 0. |
<displayName> |
No |
The user's display name. |
<givenName> |
No |
The user's given name. |
<middleName> |
No |
The user's middle names. |
<sn> |
No |
The user's last name. |
<initials> |
No |
The user's initials. |
<description> |
No |
The user's description. |
<newPassword> |
No |
If present the procedure will set the new user's password with the value of this element. All domain password policy restrictions apply. |
<propertiesXmlString> |
No |
Valid Active Directory attributes for an object. This property is passed in as an XML fragment string in the following format:
|
Output Arguments | Description |
---|---|
<user> |
The <user> structure returned by the GetPolicy named procedure. |
Remarks
Procedures Steps
Managed Plans::GetPlansByCustomer - Query Container's plan
Managed Active Directory::CreateUser
Managed Active Directory::SetPassword
Managed Active Directory::EnableUser
Hosted Active Directory::MakeUserAdmin(conditional)
Managed Plans::CreateCustomer
Sample Code
Example XML Request
<request xmlns:xsl="https://www.w3.org/1999/XSL/Transform">
<procedure xmlns:xsl='https://www.w3.org/1999/XSL/Transform'>
<execute namespace="Hosted Active Directory" procedure="CreateBusinessUser" impersonate="1">
<executeData>
<preferredDomainController>ad01.fabrikam.com</preferredDomainController>
<container>LDAP://OU=AlpineSkiHouse,OU=WH,OU=Hosting,DC=Fabrikam,DC=Com</container>
<userPrincipalName>admin@AlpineSkiHouse.com</userPrincipalName>
<displayName>Bob Smith</displayName>
<givenName>Bob</givenName>
<middleName>John</middleName>
<sn>Smith</sn>
<initials>bjs</initials>
<newPassword do-not-log="1">Pass1Word</newPassword>
<description>user</description>
<isAdmin>1</isAdmin>
<properties>
<property name="otherHomePhone">
<value>2065551212</value>
<value>2065551213</value>
</property>
<property name="street">1703 NE 91st</property>
</properties>
</executeData>
<after source="executeData" destination="data" mode="merge"/>
</execute>
</procedure>
</request>
Applies To
Hosted Active Directory Namespace API for
Hosted Messaging and Collaboration version 4.5
Hosted Messaging and Collaboration version 4.0
See also
Tasks
Hosted Active Directory::DeleteUser
Hosted Active Directory::ModifyUser