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

Multi-tenant feature #438

Closed
jijojosephk opened this issue Jun 28, 2021 · 28 comments
Closed

Multi-tenant feature #438

jijojosephk opened this issue Jun 28, 2021 · 28 comments
Labels
enhancement New feature or request hacktoberfest Community support is welcome Stale

Comments

@jijojosephk
Copy link
Collaborator

Discussed in https://github.com/IsmaelMartinez/teams-for-linux/discussions/436

Originally posted by jijojosephk June 25, 2021
I've personally suffered from missing this feature on official teams client. What are the problems?

  • It only works with one organisation
  • Well you can log out and login but there's a terrible bug. After log out when you try to login with another domain, it just does not work. This bug exists for a long time. Anyway..
  • I work with 3 different Teams Organisations everyday. Absolutely not possible with the official client.
  • I'm still unsure on why can't they do it.

What I've tried is to have multiple snaps with different names when installing. One instance itself works slowly. I imagine how it would be when there are 3.

Then, I started my own personal experiment and created a multi tenant electron wrapper. Currently I enjoy using it. I had no intentions to make it public rather I consider it as a work around for the troubles I had faced.

What are your suggestions about this feature? Is it worth?

jijojosephk added a commit to jijojosephk/teams-for-linux that referenced this issue Jun 28, 2021
@jijojosephk
Copy link
Collaborator Author

Depends on: #441

@jijojosephk jijojosephk added the enhancement New feature or request label Aug 4, 2021
@nursoda
Copy link

nursoda commented Sep 19, 2022

If one is logged-in [1] with a AzureAD account (typically a user of the own M365 tenant), and uses the primary email address of that account to register as guest in other tenants, then switching works fine in the official Teams client. Only if one has to log-in [2] with real/different users (of each tenant's AzureAD), then one currently has to log out from tenant A to be able to login to tenant B – while the official client remembers all users used and as such eases the re-login a bit. It's a pain if MFA is enabled in all tenants, though. I don't understand the goal of this issue: Is it about [1] or [2]? I think that the way intended / assumed by Microsoft is that one only works in one tenant as user and as guest in all other tenants. While I also suffer from that inability to easily switch between multiple real users, I don't think this is something the client can solve – either Microsoft allows for it or not. Or am I mistaken here?

@jijojosephk
Copy link
Collaborator Author

It's possible but yet to prioritise the work. The source code has to go through many lines of changes and to avoid any breaking changes it's not there yet. Probably 2.x range of versions can accommodate this feature. I think about it everyday but not finding time to implement.

@IsmaelMartinez
Copy link
Owner

Closing this as people has managed to get the multitenant working by running multiple instances.

@kitingChris
Copy link

Sad that this feature is closed. It would be such an advantage over the official teams client...
It would make work so much better

@jijojosephk
Copy link
Collaborator Author

@kitingChris don't get disappointed. @IsmaelMartinez just closed to focus on what's more important now. I'll come back to it. Totally busy with my personal work now. Maybe spin off another branch for experimental features?

@IsmaelMartinez
Copy link
Owner

Was tidying up issues. We had over 50 open ones but there was no much noise in this one. Happy to reopen whoever people are using this client to have multiple accounts open (with different icons and titles). Not perfect but does work.

@kitingChris
Copy link

No worry I know the struggle. And it's probably not the easiest feature to implement since it requires to separate sessions in one client.
The dream would be to have tenants in tabs or an easy switch.
Currently I use the teams client for my companies tenant and a browser tab for the customers Tennants. Bit still a pain to manage multiple instances...

@TheOpenDevProject
Copy link

@jijojosephk ScyllaDigital (My Company) would be happy to take this work on as we deal with lots of clients throughout the day and its a horrible experience.

We will fork this and contribute it back when we have something stable

@jijojosephk
Copy link
Collaborator Author

@TheOpenDevProject thanks for the openness! I have no problem, but I'll let @IsmaelMartinez the owner the repo speak if he has something to say. Kindly contribute back, it was a long struggling journey fighting the odds having zero support from MS. I had started it but could not continue due to lack of time. https://github.com/IsmaelMartinez/teams-for-linux/discussions/436#discussioncomment-925963. It would be great if this feature gets implemented.

@IsmaelMartinez
Copy link
Owner

Thanks a million! Do let me know if you want some insights and/or early planning/ feedback. It can be a bit of a mammoth task tbh, reason why we have move it to the side. It might be possible to implement it in an easier way to what I have been playing with.

Ideally we use BrowserViews inside one single BrowserWindow (to avoid memory going up to the roof), and have some sort of tabs.

Again thanks again and feel free to ask any questions.

@mikalai-t
Copy link

Can't wait this feature being implemented natively. Until that has anyone tried to run another instance in Docker container? I managed to do it previously with the official client, but can't build a new Docker image now as it was removed from the MS deb repos.

@IsmaelMartinez
Copy link
Owner

You have the option to run two instances of the application, each with its own unique configuration.

Here's how to do it:

  1. Create two separate config.json files with distinct names.
  2. In each of these config.json files, configure the following settings:
    • appTitle (if you want to give each instance a different title)
    • partition (this is an Electron internal setting used to separate data areas; more information is available here)
    • appIcon (if you want to use different icons for each Teams instance)
  3. To launch each instance with the appropriate configuration, use the following command:
teams-for-linux --config ~/.config/teams-for-linux/config.json

Make sure to replace ~/.config/teams-for-linux/config.json with the actual file path of the configuration you want to use for each instance.

More details of other config options in https://github.com/IsmaelMartinez/teams-for-linux/tree/develop/app/config.

This way, you can run multiple instances of the application with distinct settings.

@DomGiant
Copy link

DomGiant commented Oct 5, 2023

Hi @IsmaelMartinez,
I am on Debian and tried your approach but, whatever config file I use (each one with a different partition), I keep getting the same session on the same tenant. What am I missing? Thank you for your support.

@SecT0uch
Copy link

SecT0uch commented Oct 6, 2023

@DomGiant after a few trial and error here is a solution that works multi-accounts:

mkdir /home/user/.teams-data
teams-for-linux --appTitle "Teams - Account1" --customUserDir="/home/user/.teams-data/account1
teams-for-linux --appTitle "Teams - Account2" --customUserDir="/home/user/.teams-data/account2

For convenience I created /home/user/Desktop/teams1.desktop:

[Desktop Entry]
Name=Teams Account1
Exec=teams-for-linux --appTitle "Teams - Account1" --customUserDir="/home/user/.teams-data/account1
Terminal=false
PrefersNonDefaultGPU=false
Icon=teams-for-linux
Type=Application

@IsmaelMartinez
Copy link
Owner

Another example is in https://github.com/IsmaelMartinez/teams-for-linux/discussions/764#discussioncomment-5707658

It is worth to notice that the appTitle part is not working in teams-v2

@cs96and
Copy link

cs96and commented Jun 18, 2024

I've just been given a second Teams account (same email address as first account, but as a guest on another company's Teams). Just wondering if there is any update on support multi-tenant without having to run two instances?

@jmergy
Copy link

jmergy commented Jun 18, 2024

Same situation - love T4L and one one account, I have multiple orgs and switching is great. But, I have another login/account and would love to be able to flip over.

@jmergy
Copy link

jmergy commented Jun 18, 2024

@cs96and the option to run then from separate directories works really well. Here is what I do now in Debian 12.5

/usr/bin/teams-for-linux --customUserDir=/home/username/t4l/client1 --appTitle=Teams-Client1 &

/usr/bin/teams-for-linux --customUserDir=/home/username/t4l/client2 --appTitle=Teams-Client2 &

@IsmaelMartinez
Copy link
Owner

use the --appIcon=/(your icon full path) if you want to have a different icon (so you don't get confused by the 2 icons and don't know what org is each). The appTitle only works if you are using MS teams v1. That is currently broken for teams v2.

@cs96and
Copy link

cs96and commented Jun 18, 2024

If I wanted to keep using my existing data for one of them, what would I use for the --customUserDir?

Also, I'm not entirely sure how to log into the second account by itself, as it uses the same email address as my primary account. On Windows, I log in with my usual email address, and then switch to the other account.

@jmergy
Copy link

jmergy commented Jun 18, 2024

@cs96and it'll just go through the initial login again and update files there (if you point it at an new directory.

My default UserDir (on Debian 12.5) is

/home/username/.config/teams-for-linux

But YMMV

@cs96and
Copy link

cs96and commented Jun 19, 2024

Today when I logged into teams, it now gives me the option to switch between the two accounts at the top right.

@alexschomb
Copy link

Today when I logged into teams, it now gives me the option to switch between the two accounts at the top right.

Can't confirm this. Are you sure that the second "account" isn't just another organization you joined as a guest / connected organization with the other account? This works just fine, but switching between multiple accounts / tenants that are not connected at all (or even adding them) is not available right now, although available in the Windows version of Teams v2.

@cs96and
Copy link

cs96and commented Jun 19, 2024

Today when I logged into teams, it now gives me the option to switch between the two accounts at the top right.

Can't confirm this. Are you sure that the second "account" isn't just another organization you joined as a guest / connected organization with the other account? This works just fine, but switching between multiple accounts / tenants that are not connected at all (or even adding them) is not available right now, although available in the Windows version of Teams v2.

Yes it's another organisation I joined as a guest. The weird thing is that yesterday when I first joined that organisation (which I did on a Windows PC), there was no way for me to switch between the two on my Linux machine, but today there is.

Anyway, it's working now. I guess I don't fully understand the difference between guest accounts and multiple tennants.

@jmergy
Copy link

jmergy commented Jun 20, 2024

Sure - so if you have a single Microsoft 365 account, that account has a relationship to Microsoft 365 Organizations (tenants) and that relationship could be various levels - guest access or admin or user or whatever. You can switch between organizations that have relationships with that Microsoft 365 account.

If you have multiple Microsoft 365 accounts, then you cannot switch easily between those accounts. Each account has relationships to organizations. The issue for some of us is we want to be able to span accounts to get to organizations which we cannot do without logging out and in to the separate accounts or, as above, we run multiple instances of teams-for-linux that each are logging into separate Microsoft 365 accounts to access the organizations connected to those accounts.

mergy@domain.com

  • Organization 1
  • Organization 2
  • Organization 3

mergy@otherdomain.com

  • Organization 4
  • Organization 5

In the above, if I login as mergy@domain.com with teams-for-linux, I can switch between Organization 1-3 which is awesome and it doesn't matter if I have guest only on some and full-on licensing or admin on others. But, I can't be logged in as mergy@domain.com and switch to go to Organization 5 or flip accounts to get to Organization 5 without exiting everything and logging back in as mergy@otherdomain.com. Then, I can't easily jump to Organizations 1-3 but can easily switch to Organization 5

BTW, Microsoft doesn't do this at all either! The solve would honestly be to have the ability to connect accounts in Microsoft 365 at the profiles level IMHO. But, bah.

It's just a challenge for folks that serve and handle different clients and groups and have different accounts for various crazy reasons. The multiple instances and UserDir command option works well for this for now.

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 Oct 16, 2024
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Community support is welcome Stale
Projects
None yet
Development

No branches or pull requests