Hello everyone,
Your version of Dolibarr
Current version of Dolibarr (Programs) 19.0.0
Last update version (Database) 19.0.0
Initial installation version 18.0.4
Presence of external paid or free modules
No additional module installed yet
And also:
Linux Debian 12 server with MariaDB, Apache, PHP 8.2.7
I access Dolibarr from a Windows workstation using the Brave browser, as well as the mobile application on Android.
I am an Office 365 user with Exchange; I have created my application under Azure for the API, and everything works for sending emails via SMTP after manually retrieving the token.
During the configuration of the email collector, here is the error I get:
Failed to refresh access token: file_get_contents(httxs://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxxx/oauth2/v2.0/token): Failed to open stream: no suitable wrapper could be foundRefresh
When the token expires, I get the same error for sending emails.
After several searches, it seems that the request is being made on the wrong entry point at Microsoft:
The definition of implicit grant states that tokens (ID tokens or access tokens) are returned directly from the /authorize endpoint instead of the /token endpoint. This method is often used in the context of the authorization code flow, in what is called the “hybrid flow,” which retrieves the ID token on the /authorize request with an authorization code.
According to the documentation, the renewal URL should be httxs://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxxx/oauth2/v2.0/authorize using the “Token Refresh present” to make the request.
Can you confirm this for me?
I tried to make the modification on my server, but I couldn’t find the file that performs the renewal request.
I also couldn’t find any topics regarding this error, which makes me think that my analysis is incorrect and that I must have an error somewhere.
Am I the only one with this error?
Is it possible to get help to renew the Microsoft OAuth Token without manual action?
Thanks in advance. I can provide any additional information to understand the encountered problem.
Paul Masson.