Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass oauth token obtained from another machine #1521

Open
epagone opened this issue Dec 14, 2024 · 11 comments · Fixed by #1555 or #1556
Open

Pass oauth token obtained from another machine #1521

epagone opened this issue Dec 14, 2024 · 11 comments · Fixed by #1555 or #1556

Comments

@epagone
Copy link

epagone commented Dec 14, 2024

Is your feature request related to a problem? Please describe.
Intune does not support the system that I am using.

Describe the solution you'd like
I hope the answer to this request is not something already available: my search (and my understanding) didn't lead me to anything useful.

I'd like to pass an oauth token obtained form another machine to teams-for-linux. Is this currently possible or can it be potentially enabled?

Thanks.

Describe alternatives you've considered
That's the only solution to the problem that I can think of.

Additional context
Available on specific request.

@IsmaelMartinez
Copy link
Owner

Do you have a password manager? You might be able to use the ssoBasicAuthPasswordCommand and ssoBasicAuthUser config options. (I have never tried them but did help fix this issue for other users)

I don't think there is a nice/easy/secure way to pass the oath token from another app. Hopefully intune gets support in your system soon.

@epagone
Copy link
Author

epagone commented Dec 15, 2024

Hopefully intune gets support in your system soon.

I have tested it in a theoretically supported Linux system and it's riddled with bugs (example). So, not holding my breath.

Do you have a password manager? You might be able to use the ssoBasicAuthPasswordCommand and ssoBasicAuthUser config options.

I do not seem to understand the suggestion here. Why would a password manager help? Do either ssoBasicAuthPasswordCommand or ssoBasicAuthUser pass a oauth token?

If so, I could try retrieve the token from the Windows machine where I have full access to Teams (although I have no clue where it is stored) and pass it to the intune unsupported machine, repeating the process when the token expires. No need for a password manager, I can transfer this information safely encrypted between the two machines (although manually). Would this be feasible?

DavMail allows this with the O365Manual interactive dialog window (tested, works) and also Rclone seems to offer this option to mount OneDrive through the advance config options, provided that there is another installed version of Rclone on a Windows machine with intune working to retrieve the token (untested, yet).

@IsmaelMartinez
Copy link
Owner

The problem is that we don't implement the whole app, but just wrap around a thin browser. Anything we implement that goes a bit deeper, tends to be quite fragile and break often.

Can you use key authentication instead? The app does support key base authentication (see the config) and that should be more secure than you needing to pass around tokens from machine to machine every few hours.

@epagone
Copy link
Author

epagone commented Dec 17, 2024

Sorry for the basic question, but can you please explain how to retrieve the authentication key from the Windows machine? Or provide some pointers where I can develop a procedure to follow? I'm not particularly CS literate, unfortunately.

@IsmaelMartinez
Copy link
Owner

that would be set by your system administrator (or whoever is admin in microsoft teams). I know others here have done it (the community added the feature), but not done it myself, so can't be of much help.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 18, 2025
@epagone
Copy link
Author

epagone commented Jan 18, 2025

I have solved my problem resorting to copying browser cookies from one machine to another and, therefore, sadly abandoning teams-for-linux after years of fruitful use (many thanks for this to @IsmaelMartinez and all devs! ❤ ) and using the browser. Although it would be nice to get teams-for-linux on par with other apps like DavMail or Rclone in my scenario, I understand that it might not be of interest, or a priority for the developers. The issue can be closed, if that is the case. Thanks for the years of nice support.

@github-actions github-actions bot removed the Stale label Jan 19, 2025
@IsmaelMartinez
Copy link
Owner

Hi @epagone, sorry that I haven't been able to find the reason behind this. I do have the same problem in the MacOS app, what makes me think is just the way microsoft handles that re-authentication has changed. Strange it works on the PWA but I will keep it open for a bit longer as I check a few more options.

@IsmaelMartinez
Copy link
Owner

Ok, found a way to request a token:

Executing this in the webDebug console it returns a token

await document.getElementById('app')._reactRootContainer.current.updateQueue.baseState.element.props.coreServices.authenticationService._coreAuthService._authProvider.acquireToken("https://graph.microsoft.com", { correlation: document.getElementById('app')._reactRootContainer.current.updateQueue.baseState.element.props.coreServices.correlation, forceRenew: true} )

I don't see the session cookie changing, but strangely enough today it did refresh my session when I opened the laptop.

Some progress but not there yet.

@epagone
Copy link
Author

epagone commented Jan 21, 2025

Excellent, thank you very much @IsmaelMartinez!

Could you please explain how can I pass the token obtained from the Windows machine to teams-for-linux?

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Jan 21, 2025

Sorry but no, this is not yet possible. I was mean to be an update but I put a note on the Pull Request and github decided to close this. That release,1.12.7., might keep the session active. Meaning you don't need to pass that session as the session will be active for much longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants