Host Active Directory Authentication Join Domain Task
Adds the host to an Active Directory domain.
If the HostAuthenticationStoreInfo.enabled
property is True
(accessed through the info
property),
the host has joined a domain.
The vSphere API will throw the InvalidState
fault if you try
to add a host to a domain when the host has already joined a domain.
Required privileges: Host.Config.AuthenticationStore
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case HostActiveDirectoryAuthentication/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
"JoinDomainRequestType Object"
Name of the domain to be joined.
Name for an Active Directory account that has the authority to add hosts to the domain.
Password for the userName
account.
InvalidState: if the host has already joined a domain.
BlockedByFirewall: if ports needed by the join operation are blocked by the firewall.
HostConfigFault: if the host configuration prevents the join operation from succeeding.
InvalidLogin: if userName
and password
are not valid user credentials.
DomainNotFound: if the domain controller for domainName
cannot be reached.
NoPermissionOnAD: if userName
has no right to add hosts to the domain.
InvalidHostName: if the domain part of the host's FQDN doesn't match the domain being joined.
ClockSkew: if the clocks of the host and the domain controller differ by more than the allowed amount of time.
ActiveDirectoryFault: for any problem that is not handled with a more specific fault.
TaskInProgress: if the HostActiveDirectoryAuthentication object is busy.
"VimFault Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/HostActiveDirectoryAuthentication/{moId}/JoinDomain_Task