AD company -> CustomerID mapping issue

Moderator: crythias

Locked
meraj
Znuny newbie
Posts: 6
Joined: 24 Jun 2010, 23:30
Znuny Version: 2.4.7

AD company -> CustomerID mapping issue

Post by meraj »

I am running OTRS 3.0.6 and I have configured it to use an AD backend for managing customers. So far it works, AD customers can log in just fine. I have the "Company" field populated for every customer in AD, and I would like to have this used as the "CustomerID" value in OTRS so that all customers of the same company can see the tickets of other customers in their same company. Using this site: http://www.computerperformance.co.uk/Lo ... ectory.htm as a reference, I determined that "company" is the AD field I need to map. Here is my config:

Code: Select all

# customer unique id
        CustomerKey => 'sAMAccountName',
        # customer #
        CustomerID => 'mail',
        CustomerUserListFields => ['cn', 'mail'],
        CustomerUserSearchFields => ['cn', 'givenname', 'mail', 'company'],
        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '*',
        CustomerUserSearchListLimit => 250,
        CustomerUserPostMasterSearchFields => ['mail'],
        CustomerUserNameFields => ['givenname', 'sn'],
        # show not own tickets in customer panel, CompanyTickets
        CustomerUserExcludePrimaryCustomerID => 0,
        # add an ldap filter for valid users (expert setting)
#       CustomerUserValidFilter => '(!(description=locked))',
        # administrator can't change customer preferences
        AdminSetPreferences => 0,
#        # cache time to live in sec. - cache any database queries
        CacheTTL => 5,
        Map => [
            # note: Login, Email and CustomerID are mandatory!
            # if you need additional attributes from AD, just map them here.
            # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
#            [ 'UserSalutation', 'Title',      'title',           1, 0, 'var', '', 0 ],
            [ 'UserFirstname',  'Firstname',   'givenname',       1, 1, 'var', '', 0 ],
            [ 'UserLastname',   'Lastname',    'sn',              1, 1, 'var', '', 0 ],
            [ 'UserLogin',      'Username',    'sAMAccountName',             1, 1, 'var', '', 0 ],
            [ 'UserEmail',      'Email',       'mail',            1, 1, 'var', '', 0 ],
            [ 'UserCustomerID', 'CustomerID',  'company',            1, 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 ],
            [ 'UserMobile',     'Mobile',      'mobile', 1, 0, 'var', '', 0 ],
            [ 'UserRoom',       'Room',        'physicalDeliveryOfficeName', 1, 0, 'var', '', 0 ],
        ],
However, the customer's company in AD does not get populated in the "CustomerID" field in OTRS. Am I doing this incorrectly or has anyone found a different way to achieve this functionality?

Thanks,

Meraj
OTRS 3.0.4, Windows Server 2008, MySQL
meraj
Znuny newbie
Posts: 6
Joined: 24 Jun 2010, 23:30
Znuny Version: 2.4.7

Re: AD company -> CustomerID mapping issue

Post by meraj »

Doing some research, this discussion seems to suggest that what I am doing should be correct:

http://answerpot.com/showthread.php?524 ... ing%20LDAP

Just mapping an LDAP/AD field to "CustomerID" should do the job. So I am not sure if my issue is with how I have configured the LDAP/AD integration, or if it is with OTRS itself.

Does anyone have any ideas?
OTRS 3.0.4, Windows Server 2008, MySQL
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: AD company -> CustomerID mapping issue

Post by crythias »

Is it blank, error, or incorrect?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
meraj
Znuny newbie
Posts: 6
Joined: 24 Jun 2010, 23:30
Znuny Version: 2.4.7

Re: AD company -> CustomerID mapping issue

Post by meraj »

The field shows up blank in the admin panel. when the customer tries to log in, it gives the error that it needs a customerID specified.

-m
OTRS 3.0.4, Windows Server 2008, MySQL
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: AD company -> CustomerID mapping issue

Post by crythias »

If it's blank, it's the wrong field. It might be case sensitive, it might be a different field name. Or it may just not hold any value.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
meraj
Znuny newbie
Posts: 6
Joined: 24 Jun 2010, 23:30
Znuny Version: 2.4.7

Re: AD company -> CustomerID mapping issue

Post by meraj »

Thanks for the reply. Below is my config. I have downloaded AD Explorer (http://technet.microsoft.com/en-us/sysi ... s/bb963907) to view a user I want to test with and verified that the field i want is in fact called "company" (lowercase) and that it does contain a value. However, OTRS does not seem to be pulling in this value (see screenshots).

Code: Select all

ReadOnly => 1,
		# customer unique id
        CustomerKey => 'sAMAccountName',
        # customer #
        CustomerID => 'company',
        CustomerUserListFields => ['cn', 'mail'],
        CustomerUserSearchFields => ['cn', 'givenname', 'mail', 'company'],
        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '*',
        CustomerUserSearchListLimit => 250,
        CustomerUserPostMasterSearchFields => ['mail'],
        CustomerUserNameFields => ['givenname', 'sn'],
        # show not own tickets in customer panel, CompanyTickets
        CustomerUserExcludePrimaryCustomerID => 0,
        # add an ldap filter for valid users (expert setting)
#       CustomerUserValidFilter => '(!(description=locked))',
        # administrator can't change customer preferences
        AdminSetPreferences => 0,
#       # cache time to live in sec. - cache any database queries
        CacheTTL => 5,
        Map => [
            # note: Login, Email and CustomerID are mandatory!
            # if you need additional attributes from AD, just map them here.
            # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
#           [ 'UserSalutation',  'Title',       'title',                      1, 0, 'var', '', 0 ],
            [ 'UserFirstname',   'Firstname',   'givenname',                  1, 1, 'var', '', 0 ],
            [ 'UserLastname',    'Lastname',    'sn',                         1, 1, 'var', '', 0 ],
            [ 'UserLogin',       'Username',    'sAMAccountName',             1, 1, 'var', '', 0 ],
            [ 'UserEmail',       'Email',       'mail',                       1, 1, 'var', '', 0 ],
            [ 'UserCustomerID',  'CustomerID',  'company',                    1, 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 ],
            [ 'UserMobile',      'Mobile',      'mobile',                     1, 0, 'var', '', 0 ],
            [ 'UserRoom',        'Room',        'physicalDeliveryOfficeName', 1, 0, 'var', '', 0 ],
        ],
You do not have the required permissions to view the files attached to this post.
OTRS 3.0.4, Windows Server 2008, MySQL
Locked