"Listen for server notifications" does not work with OAuth2
I am currently using evolution 3.28.5-0ubuntu0.18.04.1 and testing out the "Listen for server notifications" option under "Receiving Options" and notice it works with BASIC authentication, but not with OAuth2.
To diagnose I configured with Basic authentication and started evolution with EWS_DEBUG=2 and observed the notifications working. Then configured with OAuth2 and started evolution with EWS_DEBUG=2 and observed it NOT working.
I then examined the differences between the logs generated when running with BASIC auth vs. logs generated with OAuth2 and could see the 401 being generated on the "Subscribe" request in both. The difference is the BASIC auth configured evolution would follow up the 401 with the same request and correctly populate the Authorization header with the BASIC auth credentials. The OAuth2 configured evolution does nothing further so it never subscribes.
To verify the issue is not in EWS (i.e. I originally theorized the maybe EWS only supports this feature with BASIC auth), I pulled out the Bearer token from the logs and re-submitted the "Subscribe" request from the logs using curl (except I DID populated the Bearer token) and it does work. So I'm fairly confident EWS does support this feature with OAuth2. And the bug is in evolution ews in that it is not populating the Bearer token on this request.