Bug: Thunderbird is not working with Workspace ONE
Status: RESOLVED
Priority: --
Resolution: INVALID
Created: 2020-09-18 06:13:11+00:00
Resolved: 2020-09-18 13:50:37+00:00

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

I'm trying to connect to our company's mail account. It's hosted on Office365, and I'm using the Owl extension to connect. Our company's mail accounts use VMWare's Workspace One Single Sing-ON mechanism which consists of several redirections before allowing you to connect. 
When I manually add my account everything is working fine:
1. Go to menu item Add-Ons
2. Select Owl For Exchange add-on.
3. Go to Preferences for Owl.
4. Click on "Add new accound manually..."
5. Go through the wizard

When using this method, small detached window appears that handles the Workspace ONE authentication and everything is smooth.



Actual results:

However, when close Thunderbird and open it again and select my Owl account's index folder -- TB tries  to re-authenticate but this time it uses another tab (as opposed to using the "detached" window) in its interface to handle the WorkspaceONE SSO tasks and it freezes on some of the redirections.

The error console output is:
GEThttps://outlook.office.com/owa/
[HTTP/2 302 Found 128ms]

GEThttps://login.microsoftonline.com/common/oauth2/authorize?client_id=00000002-0000-0ff1-ce00-000000000000&redirect_uri=https%3a%2f%2foutlook.office.com%2fowa%2f&resource=00000002-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code+id_token&scope=openid&msafed=0&client-request-id=e7f4fb49-8574-4187-a391-27238f23f232&protectedtoken=true&claims=%7b%22id_token%22%3a%7b%22xms_cc%22%3a%7b%22values%22%3a%5b%22CP1%22%5d%7d%7d%7d&nonce=637360060100065139.43982c9b-202f-4e93-b8b4-4e96d40fa1ce&state=FYsxEoAgDMCKns9BWloLfQ4grI5-3zoklyUBAHZncwK6oCgXVkRFQvdFbKew1Tysx4x5RZnGsdcuf-ktuBqNGfw90vO29AE
[HTTP/1.1 200 OK 1301ms]

GEThttps://aadcdn.msftauth.net/ests/2.1/content/cdnbundles/converged.v2.login.min_wixdbz3ubznoegxpcgkfog2.css
GEThttps://aadcdn.msftauth.net/shared/1.0/content/js/OldConvergedLogin_PCore_d7zWk06djGrfNYjCgW-mUQ2.js
[HTTP/2 200 OK 0ms]

Some cookies are misusing the recommended “sameSite“ attribute 3
GEThttps://outlook.office365.com/owa/prefetch.aspx
[HTTP/1.1 200 OK 233ms]

GEThttps://aadcdn.msftauth.net/ests/2.1/content/images/favicon_a_eupayfgghqiai7k9sol6lg2.ico
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/ellipsis_grey_2b5d393db04a5e6e1f739cb266e65b4c.svg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/ellipsis_white_5ac590ee72bfe06a7cecfd75b588ad73.svg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/microsoft_logo_ee5c8d9fb6248c938fd0dc19370e90bd.svg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/appbackgrounds/49-small_e58aafc980614a9cd7796bea7b5ea8f0.jpg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/picker_account_add_56e73414003cdb676008ff7857343074.svg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/picker_more_7568a43cf440757c55d2e7f51557ae1f.svg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/picker_account_aad_9de70d1c5191d1852a0d5aac28b44a6c.svg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/applogos/53_8b36337037cff88c3df203bb73d58e41.png
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/appbackgrounds/49_7916a894ebde7d29c2cc29b267f1299f.jpg
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/marching_ants_b540a8e518037192e32c4fe58bf2dbab.gif
GEThttps://aadcdn.msftauth.net/shared/1.0/content/images/marching_ants_white_166de53471265253ab3a456defe6da23.gif
GEThttps://myvmware.workspaceair.com/SAAS/auth/federation/sso?client-request-id=e7f4fb49-8574-4187-a391-27238f23f232&wa=wsignin1.0&wtrealm=urn%3afederation%3aMicrosoftOnline&wctx=LoginOptions%3D3%26estsredirect%3d2%26estsrequest%3drQIIAdNiNtQztFIxgAAjXRCpa5CWZqibnApiIYEiIS4Bz99fnpe0tjsunqiu3K_8yWgVo3xGSUlBsZW-fn5pSU5-frZeflpaZnKqXnJ-rn5-eaL-DkbGC4yMq5jMzYzNjc0MDMwMDIFmmZkaGlvqmRhbWhglWybpGhkYpemapFoa6yZZJJmAWGYpJgZpiYbJqbeY-P0dS0syjEBEflFmVeonJs60_KLc-IL84pJZzPFukcUVrvmO6S6-zt55xZZO4Tn5PmmBJulFnqa6xlX52TmVoU6OHlF5yeXeZvnO6RFh2UFugWUpbkneqeWGIZXFFSYVpkFRee7FKcmlabrZJaVOhX7uaeWWBmX-RpaOrquYiQqcTcxsQB_n5uedYmbLL0jNy0y5wML4ioXJgO8HC-MiVmDQ7e3YwMVYLOi4VWHHx9k6NxlOseoHZ7kauPv4BheUJCYX-icW6GdU5qZbGrmkGPuGJLtUGYVFRXgVl2UWm-f42hpbGU5gY5zAxraLjZODWYBBidk5wPAFG-MHNsYOdoZdnITi4RaXCDCUgY621DW0UDAwswIiU8OoC9yMB3gZAA2&cbcxt=&username=kristiyank%40vmware.com&mkt=&lc=
[HTTP/1.1 302 Found 929ms]

GEThttps://myvmware.workspaceair.com/SAAS/auth/login?dest=https://myvmware.workspaceair.com/SAAS/API/1.0/GET/apps/launch/app/ee0e2f95-04ec-42f6-97f4-2b223a352249?appLaunchId=_2491722dbcef548067ea2f47e5365b99&resourceUuid=ee0e2f95-04ec-42f6-97f4-2b223a352249
[HTTP/1.1 200 OK 246ms]

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. login
A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters, so user input may get corrupted. To avoid this problem, the page should be changed so that the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself to UTF-8 or by specifying accept-charset=utf-8 on the form element. login:11:56
LoginRecipes: getRecipes: falling back to a synchronous message for: https://myvmware.workspaceair.com LoginRecipes.jsm:266:9
NS_ERROR_XPC_SECURITY_MANAGER_VETO: browsing-context.js:914
POSThttps://myvmware.workspaceair.com/SAAS/auth/request
[HTTP/1.1 200  348ms]

GEThttps://myvmware.workspaceair.com/favicon.ico
[HTTP/1.1 200  651ms]

Cookie “AWSALB” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To learn more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite request
GEThttps://myvmware.workspaceair.com/SAAS/horizon/images/login_logo.svg
GEThttps://myvmware.workspaceair.com/SAAS/horizon/js-lib/jquery.min.js
[HTTP/1.1 200  683ms]

Some cookies are misusing the recommended “sameSite“ attribute 2
GEThttps://myvmware.workspaceair.com/favicon.ico
[HTTP/1.1 304  307ms]




Expected results:

The expected behaviour is for TB to allow me to continue the authentication process and not freeze on redirection.
I'm writing this bug report on TB bugzilla, and not on Owl bugtracker, because I think the problem is related to TB itself and its handling of http responses.