Removing "+" from Phone Number during Active Directory Sync

Hello everyone,

I’m using privacyidea to set up two-factor authentication for my organization, and I’m currently syncing user data from our Active Directory into privacyidea. However, I’ve run into an issue where phone numbers with a “+” at the beginning are causing compatibility problems with the SMS gateway I’m using.

I’m hoping someone in the community can help me figure out how to remove the “+” from phone numbers during the sync process. Here are some additional details:

  • I’m using the LDAP resolver in privacyidea to sync data from Active Directory.
  • Phone numbers in Active Directory are stored in the “telephoneNumber” attribute.
  • I need to remove the “+” from phone numbers so that they can be properly recognized by the SMS gateway I’m using.

Any advice or guidance on how to remove the “+” from phone numbers during the sync process would be greatly appreciated. Thank you all in advance for your help!

Hello octaviusse,
welcome to privacyIDEA.

You are not telling the community, which SMSProvider you use. In this case this is an important information.

Read the docs at Welcome to privacyIDEA — privacyIDEA 3.8 documentation in the sections Configuration and then SMS Gateways. It should be in there.
Regards
Cornelius

Hello Cornelinux,

Thank you for your support. You’re right, I forgot to mention that I’m using the SMPP provider.

Thanks,