User added with unexpected user type when using Active Directory.

  • Updated

When a user is added in to the CMS for the first time via Active Directory Integration, the user is not added as CMS/Membership user respectively.

Likely reasons for this problem are:

  1. Incorrect CMS default configuration.
  2. Incorrect setting in the Login Server Control.
  3. Incorrect setting for the user when adding via the API.

If the CMS is configured to automatically add users from AD when a login occurs, the User Type dropdown in Active Directory>Setup>Auto Add is the default, unless a default is specified in code.

Find more information in the documentation here.

User login is performed with one of two methods:

  • Login Server Control
  • User API

If using the Login Server Control, the setting for the control is "AutoAddType." This can be found in the documentation here.

If using the legacy API, the code would look something like this:

UserInfo = m_refUserApi.logInUser(strUsername, strPassword, Request.ServerVariables["SERVER_NAME"], strDomain, strProtocol, m_eAutoAddType);

where m_eAutoAddType could be one of two values.

  1. EkEnumeration.AutoAddUserTypes.Author
  2. EkEnumeration.AutoAddUserTypes.Member

Find more information on this API here.