GNOME Bugzilla – Bug 792190
Fails to update offline GAL
Last modified: 2018-01-04 13:35:05 UTC
From this thread: https://mail.gnome.org/archives/evolution-list/2017-December/msg00069.html Connect to an Office365 account, then open evolution in Contact view and: a) select "Offline Global Address List" b) right-click it->Refresh c) select "Contacts" from the same EWS account d) select "Offline Global Address List" again e) right-click it->Refresh and now an error is shown: The address book backend servicing “Offline Global Address List” encountered an error. The reported error was “Failed to update GAL:401 Unauthorized”.
The connections to the server are shared within the process and the OAB (Offline Address Book) connection is created on demand, with taken password from an existing connection to the server. When another address book from the same EWS account is opened, it is tried first whether it can connect to it, but without the password. The connection's local copy of the password is updated (and the previous password removed), but as the SoupSession has cached its own authentication token, the password in the EWS connection is not used at all and everything works, expect when the OAB refresh is invoked it has missing the password, thus it fails with "401 Unauthorized". The below change updates internally stored password from passed-in credentials only if the credentials contain any password, which prevents unneeded lost of the password in the EWS connection structure. Created commit dd2cee8 in ews master (3.27.4+) Created commit 2d99763 in ews gnome-3-26 (3.26.4+)