CustomerID and LDAP - how to make everyone have the same CustomerID instead of a unique one?

Moderator: crythias

Post Reply
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

CustomerID and LDAP - how to make everyone have the same CustomerID instead of a unique one?

Post by estomagado »

Hi everybody!

I'm new here and I'm an OTRS newbie. I beg for your patience with this clueless kid.

I have successfully installed and configured OTRS 6.0.18 (will update soon), everything works as expected, including a double backend configuration with the native DB and my AD via LDAP. But I have one little issue that I'd like to solve.

By default, the CustomerID of all Customer Users is their email. We don't want that. We want everyone to have the same CustomerID. Also, we don't want multiple CustomerIDs (as explained here), we want just one that is not unique.

We tried this, but it didn't work. The Company field is not blank on AD Users's Properties, and it's the same for all users, but tickets are still being created with the Customer User email as CustomerID.

Code: Select all

    CustomerKey => 'sAMAccountName',
    # CustomerID => 'mail',
    CustomerID => 'company',
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 10000,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [
    # note: Login, Email and CustomerID needed!
    #[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
    [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
    #[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var' ],
    [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
    #[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
    #[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
    };
Thank you in advance!

Your pal
Estomagado
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
root
Administrator
Posts: 3983
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: CustomerID and LDAP - how to make everyone have the same CustomerID instead of a unique one?

Post by root »

Hi,

From the posted configuration the relevant settings are fine:
  • CustomerID => 'company',
  • [ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var' ],
Any other CustomerUser configurations in use?

What do you measn with
we want just one that is not unique.
- Roy
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 ?
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

Re: CustomerID and LDAP - how to make everyone have the same CustomerID instead of a unique one?

Post by estomagado »

root wrote: 23 Sep 2019, 20:05 From the posted configuration the relevant settings are fine:
  • CustomerID => 'company',
  • [ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var' ],
Any other CustomerUser configurations in use?
No, nothing else, I think.
What do you measn with
we want just one that is not unique.
I mean: we don't want CustomerUsers to have multiple CustomerIDs. We want them to have ONLY ONE CustomerID, that is, the Company name.
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

[SOLVED] CustomerID and LDAP - how to make everyone have the same CustomerID instead of a unique one?

Post by estomagado »

Found the answer on a 2013 post on the Portuguese subforum.

I was missing one parameter.

It was like this

Code: Select all

CustomerUserPostMasterSearchFields => ['mail'],
Should be like this

Code: Select all

CustomerUserPostMasterSearchFields => ['company'],


Now it's working like a charm.
Thanks everyone!
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
root
Administrator
Posts: 3983
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [SOLVED] CustomerID and LDAP - how to make everyone have the same CustomerID instead of a unique one?

Post by root »

estomagado wrote: 23 Sep 2019, 21:43 Found the answer on a 2013 post on the Portuguese subforum.

I was missing one parameter.

It was like this

Code: Select all

CustomerUserPostMasterSearchFields => ['mail'],
Should be like this

Code: Select all

CustomerUserPostMasterSearchFields => ['company'],


Now it's working like a charm.
Hi,

Seems that something is wrong with your setup. This is the setting where OTRS take the fields to search for the sender of an e-mail to assign the proper CustomerUserID and CustomerID. The CustomerID is taken from the mapping (column with CustomerID) of the matching CustomerUser backend. OTRS take the e-mail address of the sender as the CustomerID if there is no match in any configured CustomerUser backend (SysConfig PostMaster::NewTicket::AutoAssignCustomerIDForUnknownCustomers, for details see CHANGES.md and bug 10691).

- Roy
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 ?
Post Reply