With the pace of Office 365 adoption globally, many administrators will inevitably find themselves in a position where they need to manage more than one tenant simultaneously. When managing at scale, PowerShell allows authentication to multiple tenants using different PowerShell instances. However, by far the most common way to work across multiple Office 365 tenants and accounts is via browsers connected to the workload admin portals. This also applies to end-user access to Office 365 applications, where client apps do not work well with multiple accounts.

One issue with managing multiple tenants through web portals is that it’s tricky to switch between tenants once authenticated. To force reauthentication, it’s necessary to do a full sign-out and close all browser windows. Luckily, there are profile options available in most modern browsers to help with this challenge. In this article, I’ll outline how to use profiles to manage Office 365 workloads with Microsoft Edge, Mozilla Firefox, and Google Chrome.

Multiple Browsers, Guest Mode, and Private Browsing

Before diving into profile options, it’s worth mentioning some other ways to achieve short-term access to other accounts (i.e., when carrying out temporary work with an account other than your own). For instance, different browsers can be signed into different tenants simultaneously. This means that you can be signed in as contoso.com in Microsoft Edge while signing in to the Fabrikam.com tenant through Google Chrome. It’s worth keeping in mind that in the long term this solution is limited as you eventually run out of browsers to sign in with.

Private (incognito) browsing and Guest Mode can be used similarly for short-term work. Launching a private browser session or a guest profile provides a clean browser session that will not persistently store tokens or data after it’s closed. This is an extremely useful method of signing in as an administrator account as it ensures that no cached passwords or access tokens are lying around after you finish.

Each browser has a different name for these modes, but they all work very similarly, the names of each mode across browsers are shown in Table 1:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Table 1: Naming for Guest and Private modes differs among browsers.

While Guest and Private modes are very similar, there are some slight differences to be aware of. Namely, Private modes will make bookmarks, settings, and shortcuts, etc. available from the main browser profile where guest modes do not carry these settings across, which is how you start with a blank profile.

Browser Profiles

By using profiles, you can create a distinct container for each account context, separating out authentication tokens, favorites, bookmarks, etc. In other words, you can connect to several different accounts in different tenants simultaneously using a single browser. This makes it very easy to work in multiple tenants and switch between them at will without losing open pages by closing the browser. The setup of profiles is slightly different depending on your preferred browser, so I detail the process for each of the main three below.

Microsoft Edge Profiles

Microsoft Edge includes support for profiles within the browser. Each profile can be linked to a different Microsoft or Office 365 account allowing for easy switching between tenants. Out of the box, Edge creates a new profile at first use. Signing into this profile (Figure 1) allows the synchronization of settings across multiple machines using a personal or work and school account. The profile can also be used without signing in if desired:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Figure 1: Signing into Edge with a Microsoft account.

Once the first profile is signed in, you can create additional profiles for different accounts using the “Add profile” option. These profiles can then be opened simultaneously to work across multiple tenants by opening the profile menu and choosing the appropriate profile:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Figure 2: Multiple profiles can be switched between easily.

Google Chrome Profiles

Google Chrome profiles are very similar to Edge profiles. From the profile menu, the initial profile can be signed into with a Google account. Additional profiles are created using the “Add” button. As with Edge profiles, each profile can be set up without a signed-in account and then used for the relevant tenants as shown in Figure 3:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Figure 3: Using Multiple Chrome Profiles.

Mozilla Firefox Containers

Out of the box, Firefox does not have a profile option and only works with a single account. To enable this functionality, you can install the “Firefox Multi-Account Containers” add-on. The add-on is downloadable from the Mozilla add-on site and once installed, can be configured from the Firefox toolbar at the top right of the page:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Figure 4: Click “Get Started” to set up the first container.

Firefox containers use Firefox accounts to sign in and sync data, and as with Chrome and Edge, can be used without an account. By default, Firefox creates containers for Personal, Work, Banking and Shopping, but you can amend these if you want. From the container’s menu, select “Manage Containers” to edit the existing containers and add new ones if required:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Figure 5: Managing containers in Firefox.

One difference between Firefox and the other browsers is that each container opens as a tab within the same browser instance. The container name is highlighted at the right of the address bar and reflected in the color of the tab outline as shown below in Figure 6:

How to Work in Multiple Office 365 Tenants Using Browser Profiles
Figure 6: Multiple Firefox containers open as separate tabs.

Each container works independently and can be used to access multiple accounts simultaneously as with profiles.

Summary

Profiles and containers are a great way to operate across multiple tenants and accounts without going through cumbersome sign-out processes and closing browsers. Browsers handle profiles slightly differently, but the end state is the same, an easy way to manage multiple accounts in a single browser. Profiles are also persistent so have their own history and bookmarks that can be very useful when working at scale across tenants. My preference is to use Microsoft Edge as it integrates with Office 365 nicely. However, both Chrome and Firefox can be used without issue.

About the Author

Sean McAvinue

Sean McAvinue is a Microsoft MVP in Office Development and has been working with Microsoft Technologies for more than 10 years. As Modern Workplace Practice Lead at Ergo Group, he helps customers with planning, deploying and maximizing the many benefits of Microsoft 365 with a focus on security and automation. With a passion for creative problem solving, he enjoys developing solutions for business requirements by leveraging new technologies or by extending the built-in functionality with automation. Blogs frequently at https://seanmcavinue.net and loves sharing and collaborating with the community. To reach out to Sean, you can find him on Twitter at @sean_mcavinue

Comments

  1. DV

    its a good to know and it did helped login to multiple O365 tenant

  2. Mike Crowley

    Hi all, does anyone know how to tie full URLs to containers in Firefox, not just domain names? I’d like to create bookmarks or other shortcuts that are the same domain, but use different smartlinks, thus logging into two seperate environments.

    e.g. (note domain1 vs domain2)

    https://login.microsoftonline.com/login.srf?wa=wsignin1.0&whr=domain1.com&wreply=https://tenant.sharepoint.com&LoginOptions=1

    https://login.microsoftonline.com/login.srf?wa=wsignin1.0&whr=domain2.com&wreply=https://tenant.sharepoint.com&LoginOptions=1

  3. Dave

    This is useful for browser-based apps, but what about client apps? The only solution I’ve found is to disable SSO entirely.

  4. Tristan

    Thanks for the article. My company use SSO associated to my logon account so any browser profile that i log into defaults to the organisation M365 tenant – assuming the browser profile method doesnt mittigate this?
    I use private browser sessions as the work around.

    1. Tristan

      Just in case anyone is interested, i found that in the 2nd profile if i log out of my corporate tenant, login with my personal tenant then i am able to access both tenants side by side without private browsing (albeit the session asks me to select the account to use when navigating so must be remnence of the corporate SSO token).

      Be interesting to see if this behaviour sticks after a reboot.

      Thanks for the share Sean.

Leave a Reply