Summary: | Need to be able to override app name and app id | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Aaron Williams <aaronw> |
Component: | EWS Resource | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | krissn, nicolas.fella |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Aaron Williams
2023-01-20 05:32:19 UTC
This is already supported, although as advanced functionality and not visible from the user interface. There is possibility to supply a custom OAuth2 Application Identifier (GUID) + Redirect URL. This pair is what identifies the application when performing OAuth2 authentication with the server. The settings can be changed in the resource configuration file, which is located in ${HOME}/.config/akonadi_ews_resource_<x>rc, where <x> is the consecutive number of the resource - usually 0. Inside, in the [General] section you can add the two parameters as configuration options: OAuth2AppId=452b289a-7894-41d7-9cd4-d5275739fa27 OAuth2ReturnUri=urn:ietf:wg:oauth:2.0:oob The above are the defaults which correspond to the Akonadi EWS resource app registered in Azure. In your case it will be most useful to disguise as Outlook. I don't remember the Outlook's application ID, but it should be easy to find. The return URI in this case will most probably stay at its default value. Unfortunately I cannot get to the point where I can save the resource. The "OK" button is always greyed out, I'm assuming because it requires the "Try connect" to succeed with the URL https://outlook.office365.com/ews/exchange.asmx, so I have no way of creating this file to edit. I'm guessing the OK button is only enabled AFTER a successful connection, which of course will never happen. I get the following output when I attempt OAUTH: Error Code: 530021 Request Id: 88820ad5-aaaa-4878-a952-afc1117dea00 Correlation Id: 73f1d938-1c05-4227-a9b1-d47407373179 Timestamp: 2023-01-21T09:10:35.965Z App name: Akonadi EWS App id: 452b289a-7894-41d7-9cd4-d5275739fa27 IP address: xxx.x.xxx.xx Device identifier: Not available Device platform: Android Device state: Unregistered It also looks like it does not send the custom user agent when trying to connect. If I manually (i.e. modify o365FakeUserAgent in ewsoauth.cpp) I get a different response where our oauth server is even more unhappy (I'm guessing the Mozilla user agent version is out of date). The Thunderbird user agent string says version 38. Currently, it is up to 102.6. This should probably be updated. I will attempt to change the office 365 user agent and see if that makes a difference. |