Forum Discussion

DaGbyte's avatar
DaGbyte
Copper Contributor
Oct 09, 2020
Solved

Change Teams default login

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 - mailto:user@CompanyA.com. My Teams account is in Company B - mailto: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 ๐Ÿ˜‰

  • 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)

15 Replies

  • M___S's avatar
    M___S
    Copper Contributor
    I was finally able to log on with a different (pre-existing) account than the one that somehow got defined on a new laptop by unchecking, in the settings, "Auto-start application."
  • gericht's avatar
    gericht
    Copper Contributor

    DaGbyte I do face that problem running linux teams.
    every time I start up Teams it asks me if it should change to a Guest account with an external organization I had been invited to some time ago, and which I have to use occasionally.
    since a few weeks (after I had to interact by this guest account more frequently) this inconvenience popped up.
    and I wonder - how to get rid of it?

  • 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)

    • BhargavP's avatar
      BhargavP
      Copper Contributor
      Hi Christian,

      I applied the solution you provided, However, I still get the prompt to choose from 2 x corp accounts and 1 x personal account.
    • Haith1895's avatar
      Haith1895
      Copper Contributor

      ChristianBergstrom i do have the same issue, how do i access this location/option

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

      • ChristianBergstrom's avatar
        ChristianBergstrom
        Silver Contributor

        Haith1895 Hello, https://support.microsoft.com/en-us/windows/how-to-open-registry-editor-in-windows-10-deab38e6-91d6-e0aa-4b7c-8878d9e07b11

         

        If you're not familiar with the registry I recommend that someone assist with the setting.

    • Jackie Behrbom's avatar
      Jackie Behrbom
      Copper Contributor

      Thanks for this! Do you happen to know if there is a regkey to make it use the user's e-mail address by default instead of UPN? We also have non-routable UPNs so stopping it from pre-populating the UPN is definitely helpful. I'm just wishing there was a way I could pre-populate the e-mail though.

      • ChristianBergstrom's avatar
        ChristianBergstrom
        Silver Contributor
        Hi, I am afraid not. But they do recommend that upn and primary smtp match. Teams will always default to the domain-joined account if one sign out och restart.

        You can read a bit more about upn here https://docs.microsoft.com/en-us/azure/active-directory/hybrid/howto-troubleshoot-upn-changes

        And if you havenโ€™t seen these

        https://docs.microsoft.com/en-us/microsoftteams/sign-in-teams

        https://docs.microsoft.com/en-us/microsoftteams/scripts/powershell-script-teams-reset-autostart
  • Andrew Hodges's avatar
    Andrew Hodges
    Bronze Contributor

    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?  

Resources