WriteAttribute

Metreos.Native.Ldap.WriteAttribute

Summary

WriteAttribute will add, delete, or replace an attribute on an entry in an LDAP server.

Usage

WriteAttribute allows you to add a value, replace a value or values to an attribute on an entry in an LDAP server, or delete an attribute.

The branch condition returned provides useful information in determining the cause of failure:

ConnectionFailure

ConnectionFailure indicates that it was not possible to connect to the LDAP server.

AuthenticationFailure

AuthenticationFailure indicates that the Username and Password do not have the necessary permissions to bind to the LDAP server.

WriteFailure

WriteFailure indicates that the WriteAttribute action was unable to alter the specified attribute for the specified Dn.

Failure

Failure indicates that the action failed unexpectedly for a non-LDAP protocol related reason.

Remarks

None.

Action Parameters
Parameter Name.NET TypeDefaultDescription
LdapServerHost *System.StringThe IP address or host name of the LDAP server.
LdapServerPortSystem.UInt320The port of the LDAP server.
UsernameSystem.StringA user with the appropriate privileges to update the value of an attribute on the specified Dn.
PasswordSystem.StringThe password of the user specified in the Username action parameter.
Dn *System.StringThe LDAP entry to write the attribute on.
Type *Metreos.Native.Ldap.WriteAttribute+WriteTypeSpecifies which type of operation to perform on the attribute. The list of possible operations are listed:
Add

Add will add a new attribute and the specified Value or Values on the Dn.

Replace

Replace will replace the Value or Values of an existing attribute on the Dn.

Delete

Delete will delete an attribute from a Dn.

AttributeName *System.StringThe name of the attribute to modify.
ValueSystem.StringUse this parameter instead of Values if specifying a single value for the attribute.
ValuesSystem.Collections.Specialized.StringCollectionUse this parameter instead of Value if specifying an array of values for the attribute.
VersionSystem.Int323The version of the LDAP server being connected to.
Result Data
Parameter Name.NET TypeDescription
ErrorCodeSystem.Int32An LDAP protocol-specific error code if the action fails due to WriteFailure, AuthenticationFailure, or ConnectionFailure. Note that in any of these three cases, it is not guaranteed that the error code will be populated. The error code will be 0 in the case that no LDAP-specific error code could be found.
ErrorMessageSystem.StringAn LDAP protocol-specific error message if the action fails due to WriteFailure, AuthenticationFailure, or ConnectionFailure. Note that in any of these three cases, it is not guaranteed that the error message will be populated. The error code will be null in the case that no LDAP-specific error message could be found.

Branch Conditions 

failure

No description.

success

No description.

ConnectionFailure

No description.

AuthenticationFailure

No description.

WriteFailure

No description.