Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
We have the same problem with first broken Version 19530.20138 and last working 19426.20218
According to the traces the problem is WebView2 using Edge instead of WinINet with IE7.0. Previously, we see some tries using WebView2 but after that a fallback to IE7. Since IE7 seems to share the same cookies with Office (probably due to WinInet), it works as expected. With WebView2/Edge, there are two separate cookie stores and the cookie(s) seem to be copied over in the end. However there are multiple caveats:
- Session Cookies with a Domain seem to be ignored
- This possible is due to https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/WinInet/http-cookies.md where WinInet states: "Session cookies that specify a domain are rejected."
- If there was already a session cookie in the office Client (for example an expired previous cookie or a new cookie just set seconds ago by its first disovery calls using OPTIONS), the new cookie is added to the cookie store, not replacing the existing cookie. Therefore the next call from Office contains two cookies. Depending on the Server evaluating those cookies, the correct or the wrong might be considered.
Those insights are totally observation- and experiment-based, I've not found any official documentation describing those behaviours at all. The referenced MSOFBA Documentation is from around 2022 where WebView2 probably didn't even exist yet.