Modern Authentication

Moderator: crythias

Post Reply
cfreire
Znuny newbie
Posts: 59
Joined: 24 Aug 2015, 16:40
Znuny Version: 3.3.x
Real Name: Carlos Freire
Company: Palosanto

Modern Authentication

Post by cfreire »

Hi friends, I have intended do it but the error

CommunicationLog(ID:5132258,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:8307748)::Kernel::System::MailAccount::POP3S => POP3S: Auth for user pe...

When I try to configure the OAuth2 I just see the filelds in the attached image..


How can I to get all the URL* fields please???
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Modern Authentication

Post by root »

Hi,

These fields are available from 6.4.3. Before this version you can download the token configuration, edit the file and upload it again.

- 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 ?
cfreire
Znuny newbie
Posts: 59
Joined: 24 Aug 2015, 16:40
Znuny Version: 3.3.x
Real Name: Carlos Freire
Company: Palosanto

Re: Modern Authentication

Post by cfreire »

Is there any link with steps to upload the token from files plese?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Modern Authentication

Post by root »

Hi,

Unfortunately not. Since it's no longer needed there is no requirement. Just download the configuration file and open the Yaml file in a text editor. There are 3 URLs, it's the same order as you can see in the screenshots of the blog post. Save the changes and upload the configuration file and don't forget to check overwriting existing configurations.

- 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 ?
cfreire
Znuny newbie
Posts: 59
Joined: 24 Aug 2015, 16:40
Znuny Version: 3.3.x
Real Name: Carlos Freire
Company: Palosanto

Re: Modern Authentication

Post by cfreire »

Hi friend, I have updated my Znuny to 6.4 version and I have followed all the steps detalied in your post. But when I try to fetch mails with Imaps, Imaptls andd imap, I get the next erros:

[otrs@svrotrs ~]$ bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch

Spawning child process to fetch incoming messages from mail accounts...

outlook.office365.com (IMAPS)...
IMAPS: Connection to outlook.office365.com closed.

ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-10 Perl: 5.16.3 OS: linux Time: Thu Oct 20 10:03:39 2022

Message: Error while retrieving the messages 'IMAPS': Could not select:


Traceback (27721):
Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 347
Module: Kernel::System::MailAccount::IMAP::Fetch Line: 157
Module: Kernel::System::MailAccount::MailAccountFetch Line: 649
Module: (eval) Line: 170
Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 162
Module: (eval) Line: 460
Module: Kernel::System::Console::BaseCommand::Execute Line: 454
Module: Kernel::System::Console::InterfaceConsole::Run Line: 81
Module: bin/otrs.Console.pl Line: 37

Done.

[otrs@svrotrs ~]$ bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch

Spawning child process to fetch incoming messages from mail accounts...

outlook.office365.com (IMAPTLS)...
IMAPTLS: Connection to outlook.office365.com closed.

ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-10 Perl: 5.16.3 OS: linux Time: Thu Oct 20 10:04:26 2022

Message: Error while retrieving the messages 'IMAPTLS': Could not select:


Traceback (28009):
Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 347
Module: Kernel::System::MailAccount::IMAP::Fetch Line: 157
Module: Kernel::System::MailAccount::MailAccountFetch Line: 649
Module: (eval) Line: 170
Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 162
Module: (eval) Line: 460
Module: Kernel::System::Console::BaseCommand::Execute Line: 454
Module: Kernel::System::Console::InterfaceConsole::Run Line: 81
Module: bin/otrs.Console.pl Line: 37

Done.

[otrs@svrotrs ~]$ bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch

Spawning child process to fetch incoming messages from mail accounts...

outlook.office365.com (IMAP)...
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-10 Perl: 5.16.3 OS: linux Time: Thu Oct 20 10:04:51 2022

Message: CommunicationLog(ID:5141032,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:8321868)::Kernel::System::MailAccount::IMAP => Auth error: 1 BAD Command received in Invalid state.


Traceback (28209):
Module: Kernel::System::CommunicationLog::_LogError Line: 535
Module: Kernel::System::CommunicationLog::ObjectLog Line: 297
Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 270
Module: Kernel::System::MailAccount::IMAP::Fetch Line: 157
Module: Kernel::System::MailAccount::MailAccountFetch Line: 649
Module: (eval) Line: 170
Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 162
Module: (eval) Line: 460
Module: Kernel::System::Console::BaseCommand::Execute Line: 454
Module: Kernel::System::Console::InterfaceConsole::Run Line: 81
Module: bin/otrs.Console.pl Line: 37

Done.

[otrs@svrotrs ~]$


May you to help me please?
cfreire
Znuny newbie
Posts: 59
Joined: 24 Aug 2015, 16:40
Znuny Version: 3.3.x
Real Name: Carlos Freire
Company: Palosanto

Re: Modern Authentication

Post by cfreire »

Hi friends. I have followed all the steps of the https://www.znuny.org/en/blog/modern-au ... -microsoft but when I try to fetch e-mailsm I get the next:

otrs@svrotrs ~]$ bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch --debug

Spawning child process to fetch incoming messages from mail accounts...

outlook.office365.com (IMAPTLS)...
IMAPTLS: Connection to outlook.office365.com closed.

Started at Thu Oct 20 11:59:35 2022
Using Mail::IMAPClient version 3.37 on perl 5.016003
Connecting with IO::Socket::INET PeerAddr outlook.office365.com PeerPort 143 Proto tcp Timeout 600 Debug 1
Connected to outlook.office365.com
Read: * OK The Microsoft Exchange IMAP4 service is ready. [TQBOADIAUABSADEAOQBDAEEAMAAwADUAOAAuAG4AYQBtAHAAcgBkADEAOQAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]
Sending: 1 STARTTLS
Sent 12 bytes
Read: 1 OK Begin TLS negotiation now.
Sending: 2 AUTHENTICATE XOAUTH2
Sent 24 bytes
Read: +
Sending: dXNlcj1wZWRpZG9zLmd5ZUBjb25hdXRvLmNvbS5lYwFhdXRoPUJlYXJlciBleUowZVhBaU9pSktWMVFpTENKdWIyNWpaU0k2SWtsa1NrdFVZM1pZZDNkMWMyVTNZek5tU0haaE5Ga3hkMU5pV0ZweVprSkRkblEyVnpaeVpURlhkVlVpTENKaGJHY2lPaUpTVXpJMU5pSXNJbmcxZENJNklqSmFVWEJLTTFWd1ltcEJXVmhaUjJGWVJVcHNPR3hXTUZSUFNTSXNJbXRwWkNJNklqSmFVWEJLTTFWd1ltcEJXVmhaUjJGWVJVcHNPR3hXTUZSUFNTSjkuZXlKaGRXUWlPaUpvZEhSd2N6b3ZMMjkxZEd4dmIyc3ViMlptYVdObExtTnZiU0lzSW1semN5STZJbWgwZEhCek9pOHZjM1J6TG5kcGJtUnZkM011Ym1WMEx6VmpabVJoTnpBNExURXhabVV0TkdNNU9DMWhOems0TFdNek0ySTVOV0UxTkdWaVpTOGlMQ0pwWVhRaU9qRTJOall5T0RRM05USXNJbTVpWmlJNk1UWTJOakk0TkRjMU1pd2laWGh3SWpveE5qWTJNamc0TnprekxDSmhZMk4wSWpvd0xDSmhZM0lpT2lJeElpd2lZV2x2SWpvaVFWUlJRWGt2T0ZSQlFVRkJVamhGZWtwdFUyTjRSak0xZVZwb2JERkJVamRzU2twV1ZqSm5kMGRLUmxGMVRVcE9SRkJNT1N0S2EyRlpWV0ozVTA1SVZWUnJOMHRRY20xU1ZURkRLeUlzSW1GdGNpSTZXe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KMWJtbHhkV1ZmYm1GdFpTSTZJbk5wYzNSbGJXRnpRR052Ym1GMWRHOHVZMjl0TG1Waklpd2lkWEJ1SWpvaWMybHpkR1Z0WVhOQVkyOXVZWFYwYnk1amIyMHVaV01pTENKMWRHa2lPaUpwYWxvNFRrTnNNWGRGZFZOd1luWmZSRXByZVVGQklpd2lkbVZ5SWpvaU1TNHdJaXdpZDJsa2N5STZXeUkyTW1VNU1ETTVOQzAyT1dZMUxUUXlNemN0T1RFNU1DMHdNVEl4TnpjeE5EVmxNVEFpTENKaU56bG1ZbVkwWkMwelpXWTVMVFEyT0RrdE9ERTBNeTAzTm1JeE9UUmxPRFUxTURraVhYMC5MSXE1aEpiVnEzTUJsYkhLWFBIcVVwWllsLWo2aDJlaVBkYVZhRUJPOUZseFNEZjRadHNIWmkzWnh5Z191Ulh0TFJ5TUpSdjBrd2lETkY5cXNDaF9kV29nWkNqQTJjbHB0YUhpZmljaXdXc1hMLUVrczRKLTF4bFNzc2dXUDJHcmhHSV80Tko3ZmdYUWlSX1J5Rm9ZZlpPVzExekNiNUhPcUVfVE1YdjlYM2VHZHFMenYydXJ4dUdqV25mQmtWR2JRaUl1WXV1aEpqWHhZZXFmd3pwVDJNLUhEVDA2RXZncklickdzVEpiYlBEQWpfZC1BclZyNVBJeEVIY2xrVS1fXzJicjFPbUUweEs1VFB0TC04X3A1UnFVMkU5VnI2c3FxZXFITzZ2UFNqN2pUU3QtdWxtbndreUFEWFdvRjZTWENlbE1aSVBnaTNmWHdfakNnbGFmLWcBAQ==
Sent 2694 bytes
Read: 2 OK AUTHENTICATE completed.
Sending: 3 SELECT INBOX
Sent 16 bytes
Read: 3 BAD User is authenticated but not connected.
ERROR: 3 BAD User is authenticated but not connected. at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1364.
Mail::IMAPClient::__ANON__('3 BAD User is authenticated but not connected.\x{d}\x{a}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1400
Mail::IMAPClient::_get_response('Mail::IMAPClient=HASH(0x3a632c0)', 3, undef) called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1326
Mail::IMAPClient::_imap_command_do('Mail::IMAPClient=HASH(0x3a632c0)', 'SELECT INBOX') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1225
Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x3a632c0)', 'SELECT INBOX') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 845
Mail::IMAPClient::select('Mail::IMAPClient=HASH(0x3a632c0)', 'INBOX') called at /opt/znuny-6.4.3/Kernel/System/MailAccount/IMAP.pm line 301
eval {...} called at /opt/znuny-6.4.3/Kernel/System/MailAccount/IMAP.pm line 305
Kernel::System::MailAccount::IMAP::__ANON__('select', 'INBOX') called at /opt/znuny-6.4.3/Kernel/System/MailAccount/IMAP.pm line 331
eval {...} called at /opt/znuny-6.4.3/Kernel/System/MailAccount/IMAP.pm line 345
Kernel::System::MailAccount::IMAP::_Fetch('Kernel::System::MailAccount::IMAPTLS=HASH(0x2de4878)', 'ID', 25, 'ValidID', 1, 'UserID', 1, 'QueueID', 5, ...) called at /opt/znuny-6.4.3/Kernel/System/MailAccount/IMAP.pm line 157
Kernel::System::MailAccount::IMAP::Fetch('Kernel::System::MailAccount::IMAPTLS=HASH(0x2de4878)', 'ID', 25, 'ValidID', 1, 'UserID', 1, 'QueueID', 5, ...) called at /opt/znuny-6.4.3/Kernel/System/MailAccount.pm line 649
Kernel::System::MailAccount::MailAccountFetch('Kernel::System::MailAccount=HASH(0x2c57a38)', 'ChangeTime', '2022-10-20 11:57:55', 'ID', 25, 'ValidID', 1, 'CreateTime', '2017-08-14 15:58:42', ...) called at /opt/znuny-6.4.3/Kernel/System/Console/Command/Maint/PostMaster/MailAccountFetch.pm line 170
eval {...} called at /opt/znuny-6.4.3/Kernel/System/Console/Command/Maint/PostMaster/MailAccountFetch.pm line 162
Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run('Kernel::System::Console::Command::Maint::PostMaster::MailAcco...') called at /opt/znuny-6.4.3/Kernel/System/Console/BaseCommand.pm line 460
eval {...} called at /opt/znuny-6.4.3/Kernel/System/Console/BaseCommand.pm line 454
Kernel::System::Console::BaseCommand::Execute('Kernel::System::Console::Command::Maint::PostMaster::MailAcco...', '--debug') called at /opt/znuny-6.4.3/Kernel/System/Console/InterfaceConsole.pm line 81
Kernel::System::Console::InterfaceConsole::Run('Kernel::System::Console::InterfaceConsole=HASH(0x24d7c58)', 'Maint::PostMaster::MailAccountFetch', '--debug') called at bin/otrs.C

Any help please?
Johannes
Moderator
Posts: 391
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Modern Authentication

Post by Johannes »

Is the user, your are getting the token with, allowed to access the mailbox?
The error message suggests (if I'm correct) that the connect is OK, so your token setup is somehow OK, but the user is not allowed to read it.
PepijnBplusC
Znuny newbie
Posts: 6
Joined: 19 Oct 2016, 12:32
Znuny Version: 5.x
Real Name: Pepijn Uitterhoeve
Company: BplusC

Re: Modern Authentication

Post by PepijnBplusC »

ive also had this problem

the confusion was this: we made an O365 account that wasnt a global admin, gave it limited rights to that account just for the app registration. We got all sorts of auth errors

I then went to exchange admin and gave the account send as/full access rights to the (test)box it was supposed to plunder

solved all auth issues.

Some mention in the blogpost of this could be helpful to others
Post Reply