SOLVED

Change Teams default login

%3CLINGO-SUB%20id%3D%22lingo-sub-1762235%22%20slang%3D%22en-US%22%3EChange%20Teams%20default%20login%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1762235%22%20slang%3D%22en-US%22%3E%3CP%3EI%20work%20for%20a%20company%20that%20has%20recently%20been%20acquired%20by%20another%20company.%20Both%20companies%20have%20O365%20tenants%20and%20we%20are%20working%20to%20move%20some%20services%20to%20the%20new%20company.%20The%20problem%20I%20have%20is%20that%20my%20Teams%20account%20is%20in%20a%20tenant%20other%20than%20the%20one%20associated%20with%20my%20Windows%20AD%20logon.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20logon%20to%20my%20machine%20in%20Company%20A%20-%20%3CA%20href%3D%22mailto%3Auser%40CompanyA.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Euser%40CompanyA.com%3C%2FA%3E.%20My%20Teams%20account%20is%20in%20Company%20B%20-%20%3CA%20href%3D%22mailto%3Auser%40CompanyB.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Euser%40CompanyB.com%3C%2FA%3E.%20We%20have%20disabled%20the%20O365%20features%20in%20Company%20A%20and%20now%20use%20everything%20in%20the%20Company%20B%20tenant.%20There%20is%20no%20trust%20between%20the%20domains%2C%20but%20we%20can%20access%20resources%20in%20the%20other%20domain%20using%20the%20proper%20credentials.%20All%20office%20365%20features%20work%20perfectly%20in%20Company%20B%2C%20except%20for%20teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEvery%20time%20I%20launch%20Teams%2C%20it%20wants%20to%20logon%20to%20Company%20A.%20How%20can%20I%20change%20Teams%20to%20logon%20into%20Company%20B%20instead%3F%20I%20was%20told%20by%20a%20previous%20MVP%20that%20it%20is%20not%20possible.%20I'm%20hoping%20he%20is%20wrong%20%3B)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1762235%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChange%20Teams%20Default%20Logon%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1762728%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20Teams%20default%20login%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1762728%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F825640%22%20target%3D%22_blank%22%3E%40DaGbyte%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20launching%20the%20desktop%20client%3F%20You%20have%20Single%20Sign%20on%20setup%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20happens%20when%20you%20sign%20out%20in%20the%20Teams%20client%20and%20login%20with%20the%20other%20account%20then%20restart%20the%20computer%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1762790%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20Teams%20default%20login%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1762790%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F825640%22%20target%3D%22_blank%22%3E%40DaGbyte%3C%2FA%3E%26nbsp%3BHi%20David%2C%20would%20it%20be%20an%20alternative%20to%20prevent%20the%20automatic%20population%20of%20the%20UPN%3F%20If%20applicable%20you%20can%20use%20this%20reg%20key.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETurn%20off%20pre-population%20of%20the%20UPN%3A%3C%2FP%3E%3CP%3EComputer%5CHKEY_CURRENT_USER%5CSoftware%5CMicrosoft%5COffice%5CTeams%3CBR%20%2F%3ESkipUpnPrefill%20(REG_DWORD)%3CBR%20%2F%3E0x00000001%20(1)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1763625%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20Teams%20default%20login%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1763625%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F551905%22%20target%3D%22_blank%22%3E%40bec064%3C%2FA%3E%26nbsp%3B-%20That%20seems%20to%20have%20done%20the%20trick!%20I%20do%20want%20to%20point%20out%20that%20the%20HomeUserUpn%20value%20IS%20set%20correctly%20to%20my%20Company%20B%20address.%20When%20I%20added%20that%20key%20you%20suggested%2C%20it%20just%20took%20me%20right%20into%20Teams.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I work for a company that has recently been acquired by another company. Both companies have O365 tenants and we are working to move some services to the new company. The problem I have is that my Teams account is in a tenant other than the one associated with my Windows AD logon.

 

I logon to my machine in Company A - user@CompanyA.com. My Teams account is in Company B - user@CompanyB.com. We have disabled the O365 features in Company A and now use everything in the Company B tenant. There is no trust between the domains, but we can access resources in the other domain using the proper credentials. All office 365 features work perfectly in Company B, except for teams.

 

Every time I launch Teams, it wants to logon to Company A. How can I change Teams to logon into Company B instead? I was told by a previous MVP that it is not possible. I'm hoping he is wrong ;)

6 Replies
Highlighted

@DaGbyte 

 

This is launching the desktop client? You have Single Sign on setup?

 

What happens when you sign out in the Teams client and login with the other account then restart the computer?  

Highlighted
Best Response confirmed by DaGbyte (New Contributor)
Solution

@DaGbyte Hi David, would it be an alternative to prevent the automatic population of the UPN? If applicable you can use this reg key.

 

Turn off pre-population of the UPN:

Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\Teams
SkipUpnPrefill (REG_DWORD)
0x00000001 (1)

Highlighted

@bec064 - That seems to have done the trick! I do want to point out that the HomeUserUpn value IS set correctly to my Company B address. When I added that key you suggested, it just took me right into Teams.

Highlighted

@DaGbyte Glad to hear it solved the issue! It would be interesting to hear what Andy asked about though. Did you try to sign out and back in manually from the Teams client, and was it still trying with the wrong UPN then?

 

By the way, this is good one I just want to attach while we are talking about these settings.

https://docs.microsoft.com/en-us/microsoftteams/scripts/powershell-script-teams-reset-autostart

Highlighted

@bec064 Yes - every time my logon name was for the domain my machine is joined to. 

 

 

Highlighted

@DaGbyte Hi, thanks for letting me know. And as far as I know that is the expected behavior.

 

*edit*

 

Hey, what about that! Just found this article that actually describes my previous suggestion too. Always good to be able to refer to the docs so here you go as well!

https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/known-issues/teams-defaults-to-domain-j...