pem.ad.binding.addUserBinding

This method is supported by Operations starting from version 5.0.1_KB9347.

This method provides a service for an existing Service User by an Active Directory (AD) entry.

The optional parameters user_id and login are mutually exclusive. Exactly one of them should be passed.

The method has the following input parameters:

Name

Type

Short Description

[user_id]

int

The identifier (ID) of the Service User.

[login]

string

The Service User's login.

windows_domain

string

The target AD domain, where the AD entry is needed.

service_name

string

An arbitrary name that uniquely identifies the service to be attached to the Service User. In case multiple packages are present in the same subscription, they must use different service_name values to avoid undesired interference.

[subscription_id]

int

The identifier (ID) of a subscription containing the target service. The following use-cases are available:

  • The Service User has been bound to the subscription with services in the subscription-local mode (for example pem.addUser has been called and subscription_id has been specified). You can specify the identifier of the same subscription containing the target subscription-local service or you can omit this parameter. The target subscription-local service from the same subscription will be attached to the Service User and the corresponding AD entry will be created.
  • The Service User has not been bound to any subscription (for example pem.addUser has been called and owner_account_id has been specified). The Service User does not have any services assigned. You can specify the identifier of the subscription containing the target subscription-local service. The target subscription-local service from the subscription will be attached to the Service User and this Service User will be bound to the subscription. The corresponding AD entry will be created.
  • The Service User has not been bound to any subscription (for example pem.addUser has been called and owner_account_id has been specified). The Service User does not have any services assigned. You can specify the identifier of the subscription containing the target account-wide service. The target account-wide service from the subscription will be attached to the Service User and the corresponding AD entry will be created.
  • The Service User has not been bound to any subscription (for example pem.addUser has been called and owner_account_id has been specified). The Service User has services from subscriptions with services in the account-wide mode. You can specify the identifier of the subscription containing the target account-wide service. The target account-wide service from the subscription will be attached to the Service User and the corresponding AD entry will be created.

The method has the following output parameters:

The LDAP path (string) to the AD entry for which the binding has been registered.

Note: Service User ID is not displayed in Operations control panel. You may use the pem.getUserByLogin or pem.getUsers methods to obtain the ID of the required Service User. Also, you may use the Operations Public API methods, which contain Service User ID(s) in the list of the output parameters.