We use Active Directory as the source for customers in our OTRS installation. When I enter the name of a 'real' customer in To field (for example in ticket forward dialog) the correct e-mail address is fetched. But we also have some e-mail addresses saved in AD in form of contacts. What would I have to do so that these contacts also appear as suggestions in the 'to' field?
In this particular case we have the support address of an external service provider saved as a contact in Active Directory. I would like OTRS to provide this address as suggestion in 'to' field.
Active Directory contacts in To field
Moderator: crythias
Active Directory contacts in To field
Last edited by aph on 02 Feb 2016, 10:10, edited 1 time in total.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Administrator
- Posts: 4011
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: Active Directory contacts in To field
I guess you have a filter configure which prevents OTRS from finding theses contacts. I would add a new CustomerUser configuration with an own field mapping.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Re: Active Directory contacts in To field
Thanks for the reply. I do not filter customer users. I tried adding a new CustomerUser configuration, yet no luck. Your help is appreciated Below is my CustomerUser configuration:
Code: Select all
# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser2} = {
Name => 'LDAP Backend',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'xxxx.xxxx.local',
# ldap base dn
BaseDN => 'dc=xxxx,dc=local',
# search scope (one|sub)
SSCOPE => 'sub',
# The following is valid but would only be necessary if the
# anonymous user does NOT have permission to read from the LDAP tree
UserDN => 'CN=xxxx,CN=Users,DC=xxxx,DC=local',
UserPw => 'xxxx',
# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
# AlwaysFilter => '',
# if both your frontend and your LDAP are unicode, use this:
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
# if your frontend is unicode and the charset of your
# ldap server is iso-8859-1, use these options.
# SourceCharset => 'iso-8859-1',
# DestCharset => 'utf-8',
# die if backend can't work, e. g. can't connect to server
# Die => 0,
# # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
# port => 389,
# timeout => 120,
# async => 0,
# version => 3,
inet4 => 1,
},
},
# # customer unique id
CustomerKey => 'userPrincipalName',
# # customer #
CustomerID => 'company', #'userPrincipalName', #'company', #'distinguishedName',#
CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['uid', 'cn', 'mail'],
# CustomerUserSearchPrefix => '',
# CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
# CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
# show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',
# admin can't change customer preferences
# AdminSetPreferences => 0,
# cache time to live in sec. - cache any ldap queries
# CacheTTL => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
# [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'userPrincipalName', 1, 1, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'userPrincipalName', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
],
};
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
Re: Active Directory contacts in To field
Contacts do not use the same fields as regular users. 'mail' and 'cn' might not be filled or may not contain what you'd expect. The email address is probably in msExchUMDtmfMap, but that's a multi value string so I'm not sure if OTRS will like it.
Re: Active Directory contacts in To field
Ehhh, why don't you use this in those places?aph wrote:Thanks for the reply. I do not filter customer users. I tried adding a new CustomerUser configuration, yet no luck. Your help is appreciated Below is my CustomerUser configuration:Code: Select all
CustomerUserSearchFields => ['uid', 'cn', 'mail'], [ 'UserEmail', 'Email', 'userPrincipalName', 1, 1, 'var', '', 0 ],
Code: Select all
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
OTRS 6.0.x on CentOS 7 with a PostgreSQL database.
Re: Active Directory contacts in To field
The e-mail address is stored in the attribute mailEXG133 wrote:Contacts do not use the same fields as regular users. 'mail' and 'cn' might not be filled or may not contain what you'd expect. The email address is probably in msExchUMDtmfMap, but that's a multi value string so I'm not sure if OTRS will like it.
I had used the attribute userPrincipalName as attribute since it is identical to 'mail' on my test system. Making the changes you suggested still doesn't show the desired resultsjjurkus wrote:Ehhh, why don't you use this in those places?aph wrote:Thanks for the reply. I do not filter customer users. I tried adding a new CustomerUser configuration, yet no luck. Your help is appreciated Below is my CustomerUser configuration:Code: Select all
CustomerUserSearchFields => ['uid', 'cn', 'mail'], [ 'UserEmail', 'Email', 'userPrincipalName', 1, 1, 'var', '', 0 ],
If you are interested what fields in AD are filled with what, use something like JXplorer to see all the correct names for the ldap stuff.Code: Select all
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'], [ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
You do not have the required permissions to view the files attached to this post.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache