Ir al contenido
Menú
Se marcó esta pregunta

Dear All,

I am using the "fetchmail outlook" to authenticate to o365 version 15.0.1.0.1

My systems settings :

- web.base.url = my url of odoo

- web.base.url.freeze  = True then normally my url didn't change.


Finally, when I try to export in pdf, it takes too long and I have found in the forum to use :

- report.url  = http://localhost:8069 then the pdf is exported asap.


But now, I am figuring out an issue when odoo fetch the outlook imap, the "web\.base\.url"\ is\ forced\ to\ "http://localhost"\ even\ the\ "web\.base\.url\.freeze\ is\ forced\ to\ True"\.

The\ error\ message\ is\ :

INFO:odoo\.addons\.fetchmail\.models\.fetchmail:General\ failure\ when\ trying\ to\ fetch\ mail\ from\ imap\ server\ accounting\ o365\ outlook\ incoming\.\#012Traceback\ \(most\ recent\ call\ last\):\#012\ \ File\ "/opt/odoo/15\.0/odoo/addons/fetchmail/models/fetchmail\.py",\ line\ 184,\ in\ fetch_mail\#012\ \ \ \ imap_server\ =\ server\.connect\(\)\#012\ \ File\ "/opt/odoo/15\.0/odoo/addons/fetchmail/models/fetchmail\.py",\ line\ 115,\ in\ connect\#012\ \ \ \ self\._imap_login\(connection\)\#012\ \ File\ "/opt/odoo/15\.0/odoo/addons/fetchmail_outlook/models/fetchmail_server\.py",\ line\ 54,\ in\ _imap_login\#012\ \ \ \ auth_string\ =\ self\._generate_outlook_oauth2_string\(self\.user\)\#012\ \ File\ "/opt/odoo/15\.0/odoo/addons/microsoft_outlook/models/microsoft_outlook_mixin\.py",\ line\ 167,\ in\ _generate_outlook_oauth2_string\#012\ \ \ \ \)\ =\ self\._fetch_outlook_access_token\(self\.microsoft_outlook_refresh_token\)\#012\ \ File\ "/opt/odoo/15\.0/odoo/addons/microsoft_outlook/models/microsoft_outlook_mixin\.py",\ line\ 108,\ in\ _fetch_outlook_access_token\#012\ \ \ \ response\ =\ self\._fetch_outlook_token\('refresh_token',\ refresh_token=refresh_token\)\#012\ \ File\ "/opt/odoo/15\.0/odoo/addons/microsoft_outlook/models/microsoft_outlook_mixin\.py",\ line\ 146,\ in\ _fetch_outlook_token\#012\ \ \ \ raise\ UserError\(_\('An\ error\ occurred\ when\ fetching\ the\ access\ token\.\ %s'\)\ %\ error_description\)\#012odoo\.exceptions\.UserError:\ An\ error\ occurred\ when\ fetching\ the\ access\ token\.\ AADSTS50011:\ The\ redirect\ URI\ 'http://localhost:8069/microsoft_outlook/confirm'\ specified\ in\ the\ request\ does\ not\ match\ the\ redirect\ URIs\ configured\ for\ the\ application\ '053c8b68\-xxxxxxxxxx0fd7'\.\ Make\ sure\ the\ redirect\ URI\ sent\ in\ the\ request\ matches\ one\ added\ to\ your\ application\ in\ the\ Azure\ portal\.\ Navigate\ to\ https://aka\.ms/redirectUriMismatchhttps://aka.ms/redirectUriMismatchErrorError to learn more about how to fix this.#015#012Trace ID: 5289780b-ce64-4609-acb9-0fe068eb4100#015#012Correlation ID: ac9001e8-d320-418b-9071-1538cfdf7e5f#015#012Timestamp: 2023-04-17 18:15:57Z

Thanks if anybody could highlight me to the correct path.
Avatar
Descartar
Mejor respuesta

This error message is typically related to an issue with the Microsoft Outlook integration in Odoo. It means that the redirect URI specified in the Outlook integration settings does not match the redirect URIs configured in the Microsoft Azure Active Directory application.

Here are some steps to resolve the issue:

  1. Log in to the Microsoft Azure Portal and navigate to the Azure Active Directory application you created for the Odoo Outlook integration.

  2. Under the "Authentication" tab, verify that the redirect URI specified in the application settings matches the redirect URI specified in the Odoo Outlook integration settings. In this case, the redirect URI should be 'http://localhost:8069/microsoft_outlook/confirm'.

  3. If the redirect URIs do not match, update the redirect URI in the Azure Active Directory application settings to match the one specified in the Odoo Outlook integration settings.

  4. Save the changes and try to connect to the Outlook integration again in Odoo.


Avatar
Descartar
Autor

Thanks dear for your highlight.

We have forced the "report.url.freeze" to "True" and "reset confirmation " and finally forced "Edit Setting" than we got again the popup to enable the OAUTH2.0 and the callback worked again.

Best Regards,

Mejor respuesta

Dear youssef

Please explain your steps to resolve this issue

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
mar 22
4788
3
jul 25
23847
2
mar 23
4808
0
feb 23
2822
1
dic 20
5049