Create an Active Directory account for an SVM
POST /protocols/active-directory
Introduced In: 9.12
Creates an Active Directory account for a given SVM.
Related ONTAP commands
-
vserver active-directory create
Important notes
-
Active Directory account creation is asynchronous. Response contains Task UUID and Link that can be queried to get the status.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
force_account_overwrite |
boolean |
If set to true and a machine account exists with the same name as specified in "name" in Active Directory, it will be overwritten and reused. |
fqdn |
string |
Fully qualified domain name. |
name |
string |
Active Directory (AD) account NetBIOS name. |
organizational_unit |
string |
Organizational unit under which the Active Directory account will be created. |
password |
string |
Administrator password required for Active Directory account creation, modification and deletion. |
svm |
||
username |
string |
Administrator username required for Active Directory account creation, modification and deletion. |
Example request
{
"force_account_overwrite": "",
"fqdn": "server1.com",
"name": "account1",
"organizational_unit": "CN=Test",
"password": "testpwd",
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"username": "admin"
}
Response
Status: 201, Created
Name | Type | Description |
---|---|---|
force_account_overwrite |
boolean |
If set to true and a machine account exists with the same name as specified in "name" in Active Directory, it will be overwritten and reused. |
fqdn |
string |
Fully qualified domain name. |
name |
string |
Active Directory (AD) account NetBIOS name. |
organizational_unit |
string |
Organizational unit under which the Active Directory account will be created. |
password |
string |
Administrator password required for Active Directory account creation, modification and deletion. |
svm |
||
username |
string |
Administrator username required for Active Directory account creation, modification and deletion. |
Example response
{
"force_account_overwrite": "",
"fqdn": "server1.com",
"name": "account1",
"organizational_unit": "CN=Test",
"password": "testpwd",
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"username": "admin"
}
Headers
Name | Description | Type |
---|---|---|
Location |
Useful for tracking the resource location |
string |
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
656464 |
Failed to create the Active Directory machine account. Reason: Invalid Credentials. |
656465 |
Failed to create the Active Directory machine account. Reason: Account with same name already exists. |
656466 |
Failed to create the Active Directory machine account. Reason: Domain Controller is not reachable or does not exist. |
656467 |
Failed to create the Active Directory machine account. Reason: Organizational-Unit not found. |
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
node
Name | Type | Description |
---|---|---|
name |
string |
|
uuid |
string |
active_directory_discovered_server_reference
Name | Type | Description |
---|---|---|
ip |
string |
The IP address of the server that was discovered. |
name |
string |
Server Name |
type |
string |
The type of the server that was discovered. |
discovered_servers
Name | Type | Description |
---|---|---|
domain |
string |
The Active Directory domain that the discovered server is a member of. |
node |
||
preference |
string |
The preference level of the server that was discovered. |
server |
||
state |
string |
The status of the connection to the server that was discovered. |
preferred_dcs
Name | Type | Description |
---|---|---|
fqdn |
string |
Fully Qualified Domain Name. |
server_ip |
string |
IP address of the preferred DC. The address can be either an IPv4 or an IPv6 address. |
svm
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
active_directory
Name | Type | Description |
---|---|---|
force_account_overwrite |
boolean |
If set to true and a machine account exists with the same name as specified in "name" in Active Directory, it will be overwritten and reused. |
fqdn |
string |
Fully qualified domain name. |
name |
string |
Active Directory (AD) account NetBIOS name. |
organizational_unit |
string |
Organizational unit under which the Active Directory account will be created. |
password |
string |
Administrator password required for Active Directory account creation, modification and deletion. |
svm |
||
username |
string |
Administrator username required for Active Directory account creation, modification and deletion. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |