IDRARestServerUserCreate Method |
UriTemplate: /dra/domains/{domainFqdn}/users/post
Namespace: NetIQ.DRA.RestServiceLibrary
[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 )
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.
{ "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" } }
{ "user": { "userPassword": "^bfvnaT8", "class": "user", "distinguishedName": "cn=Fred Jones,OU=East Coast,DC=MyDomain,DC=corp", "objectClass": "user" }, "draServerAndPort": "draServer01.MyDomain.corp:11192", "errors": [] }
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.
{ "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 } }
{ "user": { "class": "user", "distinguishedName": "cn=Janet Smith,OU=East Coast,DC=MyDomain,DC=corp", "objectClass": "user" }, "draServerAndPort": "draServer01.MyDomain.corp:11192", "errors": [] }
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.
{ "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 } }
{ "user": { "class": "user", "distinguishedName": "cn=Nancy Jackson,OU=East Coast,DC=MyDomain,DC=corp", "objectClass": "user" }, "draServerAndPort": "draServer01.MyDomain.corp:11192", "errors": [] }