Views:
Behavior: 
When attempting to run a synchronization job from Active Directory, the following error is shown in DocuWare Administration, which is preventing new users from being added to our system;

"Unable to cast object of type 'DocuWare.Settings.ExternalUserDirectories.NTUser' to type 'DocuWare.Settings.ExternalUserDirectories.LDAPUser'."


(Note: In this case, the customer has configured a Windows External User Directory for this specific sync job)


Solution:
When utilizing Windows protocol within External User Directory, this method does not offer any detailed configuration options. With this in mind, it is recommended to switch to an LDAP protocol, as this provides detailed configuration options that would be more suitable for your DocuWare system. Upon switching to the LDAP protocol, configure the attributes used for the loginname, user object class, identification, etc. The value should be the same as the synchronized usernames you have in DocuWare (Information also applicable for groups). Group object class must be "group", which is only possible by accessing the Active Directory and going through the Attribute Editor.
 
To navigate to the Attribute Editor, open your Active Directory, click on the user, and go to View > Advanced Features. Within the user's properties, click on the Attribute Editor tab, where all the user's attributes will be displayed.
Note: For additional information on configuring an LDAP protocol, please see 
KBA-36910
Note: Using LDAP instead of Windows should fix the behavior/error. Otherwise, there is another workaround which consists of using the User Synchronization V2 tool instead. Please see KBA-36557 for the steps regarding User Synchronization V2.

This KBA is applicable to both On-Premise & Cloud Organizations.