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

Can't log in into more than two tenancies (one tenancy?) #38

Open
veselov opened this issue May 16, 2023 · 4 comments
Open

Can't log in into more than two tenancies (one tenancy?) #38

veselov opened this issue May 16, 2023 · 4 comments

Comments

@veselov
Copy link

veselov commented May 16, 2023

Hello.

One of the reasons I came across this is because M$ own teams just don't do multi-tenancy well.
At work, I get conscripted into all these customer tenancies, under my main work user ID.
So, RN I have 3 tenancies - my own, and two customer ones.
However, I can't add more than 2 accounts under the same username and different tenancy - this results into a pop-up error message saying:

Unable to save new account
An account already exists with the specified criteria.

The debug output is simply:

(20:50:38) gtkaccount: Trying to add a duplicate prpl-eionrobb-msteams account (pawel.veselov@xxx).

I also don't think that even two tenancies work - seems like once I log in into one, it confabulates it with the other...

P.S. Nifty plugin, thank you for putting this together.

@EionRobb
Copy link
Owner

I should probably clear that up in the readme, but the email address doesn't really matter too much, you can put whatever you like in there, but it has to be unique for Pidgin to allow it. Because you're logging in via the web, it's kind of ignored - behind the scenes it's replacing your username with an orgid:.... username anyway

Off the top of my head (writing this on my phone rn) there shouldn't be anything stopping you from using a username like "email account1". For my multi-tenant setups I use "[email protected]" and "[email protected]" just to help differentiate, but worth a try without it being in email form.

Let me know how you get on :)

@veselov
Copy link
Author

veselov commented Jun 9, 2023

Out of 4 accounts I have:

1 direct access account worked fine
1 direct access account fails with message parsing error (in logs). Unfortunately, that message has all kinds of data I can't publicly disclose, if you send your GPG pub key+email, I can email it to you.
1 guest access account worked fine
1 guest access account just keeps failing with auth errors (in the logs), the OAuth authentication itself went through (at least it produced a code) (see log below).
The logs are hard to analyze because none of the message clearly (at least to me) indicate which account the message is about. And even with two working accounts there is enough chatter there for it to be confusing.

After adding an account, I have to stop/restart pidgin before the data starts populating into the main window.

Then pidgin crashed about 5 minutes in.

(04:07:57) teams: Fetching url https://substrate.office.com/search/api/v1/suggestions?scenario=
(04:07:57) http: Performing new request 0x561752908820 to substrate.office.com.
(04:07:57) teams: Fetching url https://substrate.office.com/search/api/v1/suggestions?scenario=
(04:07:57) http: Performing new request 0x561752908820 to substrate.office.com.
(04:07:57) http: Request 0x561752e57fa0 performed without success.
(04:07:57) teams: No data in response
(04:07:57) teams: Fetching url https://apac.ng.msg.teams.microsoft.com/v1/users/ME/conversations?startTime=1686276122000&pageSize=100&view=msnp24Equivalent&targetType=Passport|Skype|Lync|Thread|PSTN|Agent
(04:07:57) http: Performing new request 0x561752b32b40 to apac.ng.msg.teams.microsoft.com.
(04:07:57) teams: Fetching url https://presence.teams.microsoft.com/v1/me/forceavailability/
(04:07:57) http: Performing new request 0x561752ca04d0 to presence.teams.microsoft.com.
(04:07:57) teams: Fetching url https://presence.teams.microsoft.com/v1/me/endpoints/
(04:07:57) http: Performing new request 0x561752b2c600 to presence.teams.microsoft.com.
(04:07:57) teams: Fetching url https://presence.teams.microsoft.com/v1/me/publishnote
(04:07:57) http: Performing new request 0x561752b29b90 to presence.teams.microsoft.com.
(04:07:57) dnsquery: Performing DNS lookup for presence.teams.microsoft.com
(04:07:57) dns: Successfully sent DNS request to child 1903902
(04:07:57) dns: Got response for 'presence.teams.microsoft.com'
(04:07:57) dnsquery: IP resolved for presence.teams.microsoft.com
(04:07:57) proxy: Attempting connection to 52.123.134.120
(04:07:57) proxy: Connecting to presence.teams.microsoft.com:443 with no proxy
(04:07:57) proxy: Connection in progress
(04:07:57) proxy: Connecting to presence.teams.microsoft.com:443.
(04:07:57) proxy: Connected to presence.teams.microsoft.com:443.
(04:07:57) http: Request 0x561752ca04d0 performed without success.
(04:07:57) http: Request 0x561752b2c600 performed without success.
(04:07:57) http: Request 0x561752908820 performed without success.
(04:07:57) teams: Error parsing response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
 </fieldset></div>
</div>
</body>
</html>

@EionRobb
Copy link
Owner

You could try enabling just one account at a time to try track down which one is at fault?

The crash is very undesirable :( Would you kindly be able to follow https://developer.pidgin.im/wiki/GetABacktrace to get a backtrace and attach to this ticket?

@EionRobb
Copy link
Owner

Hi there, Any chance you'd be able to test with the latest version of the plugin? Since your comment I've changed the way auth was done and caught a few crashes

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

No branches or pull requests

2 participants