Click or drag to resize

IDRARestServerUserCreate Method

Creates a new user object.

UriTemplate: /dra/domains/{domainFqdn}/users/post

Namespace:  NetIQ.DRA.RestServiceLibrary
Assembly:  NetIQ.DRA.RestServiceLibrary (in NetIQ.DRA.RestServiceLibrary.dll) Version: 10.2.2.1
Syntax
[OperationContractAttribute]
[WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json, 
	RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, 
	UriTemplate = "/dra/domains/{domainFqdn}/users/post")]
Stream UserCreate(
	string domainFqdn,
	User user,
	ConnectionParameters connectionParameters
)

Parameters

domainFqdn
Type: SystemString
The FQDN of the domain to create the user in.
user
Type: NetIQ.DRA.Common.Rest.DataModelsUser
A User object to create
connectionParameters
Type: NetIQ.DRA.Common.Rest.DataModelsConnectionParameters
Optional ConnectionParameters to specify a DRA server and Assistant Admin credentials.

Return Value

Type: Stream
A GetUserPropertiesResponse containing the operation results.
Examples

Creating a Basic User

This will create a user in the East Coast OU of MyDomain.corp and add that user to the Domain Users and Accounting groups. Since a password is not sent in the payload, DRA generates one and returns it in the response. In this scenario the new user would be required to change their password at next log in.

Request Payload
{
    "user": {
        "containerOnePointPath": "OnePoint://OU=East Coast,DC=MyDomain,DC=corp",
        "samAccountName": "jonesf",
        "userPrincipalName": "jonesf@MyDomain.corp",
        "displayName": "Fred Jones",
        "firstName": "Fred",
        "lastName": "Jones",
        "memberOf": [{
            "distinguishedName": "CN=Domain Users,CN=Users,DC=MyDomain,DC=corp"
        }, {
            "distinguishedName": "CN=Accounting,CN=Users,DC=MyDomain,DC=corp"
        }],
        "primaryGroupPath": "OnePoint://CN=Domain Users,CN=Users,DC=MyDomain,DC=corp"
    }
}
Response
{
    "user": {
        "userPassword": "^bfvnaT8",
        "class": "user",
        "distinguishedName": "cn=Fred Jones,OU=East Coast,DC=MyDomain,DC=corp",
        "objectClass": "user"
    },
    "draServerAndPort": "draServer01.MyDomain.corp:11192",
    "errors": []
}

Creating a User With a Mailbox

This will create a user with a mailbox in the specified Exchange mailbox store. A password is specified for the new user so DRA does not return one.

Request Payload
{
    "user": {
        "containerOnePointPath": "OnePoint://OU=East Coast,DC=MyDomain,DC=corp",
        "samAccountName": "smithj",
        "userPrincipalName": "smithj@MyDomain.corp",
        "displayName": "Janet Smith",
        "firstName": "Janet",
        "lastName": "Smith",
        "createMailbox": true,
        "mailNickname": "smithj",
        "mailboxStore": "LDAP://CN=Mailbox Database 0565232367,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=MYDOMAIN,DC=CORP",
        "userPassword": "HJv5MYkz$",
        "userMustChangePassword": false
    }
}
Response
{
    "user": {
        "class": "user",
        "distinguishedName": "cn=Janet Smith,OU=East Coast,DC=MyDomain,DC=corp",
        "objectClass": "user"
    },
    "draServerAndPort": "draServer01.MyDomain.corp:11192",
    "errors": []
}

Creating an Email Enabled User

This will create a user with an SMTP email address using Exchange 2013 management tools. A password is specified for the new user so DRA does not return one.

Request Payload
{
    "user": {
        "containerOnePointPath": "OnePoint://OU=East Coast,DC=MyDomain,DC=corp",
        "samAccountName": "jacksonn",
        "userPrincipalName": "jacksonn@MyDomain.corp",
        "displayName": "Nancy Jackson",
        "firstName": "Nancy",
        "lastName": "Jackson",
        "createEmail": true,
        "emailAddress": "SMTP:jacksonn@mycorp.com",
        "mailNickname": "jacksonn",
        "legacyExchangeDn": "CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Cris2010 First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=corp",
        "exchangeTool": 16,
        "userPassword": "HJv5MYkz$",
        "userMustChangePassword": false
    }
}
Response
{
    "user": {
        "class": "user",
        "distinguishedName": "cn=Nancy Jackson,OU=East Coast,DC=MyDomain,DC=corp",
        "objectClass": "user"
    },
    "draServerAndPort": "draServer01.MyDomain.corp:11192",
    "errors": []
}
See Also