I used to work at a company with an Active Directory, but I no longer do. I now work at another company which uses Azure, but doesn't use Active Directory or Outlook etc.

Whenever I try to log into Azure, I get redirected to "your organization's sign-in page", which is the SSO login page for a company I no longer work at, and thus can not login with those credentials. How can I stop this behaviour?

edit: To clarify, when I try to login with myemail@company2.com I first get redirected to the SSO login page for oldemail@company1.com. Note that I don't have administrative permissions for either of the accounts.

Here are the before and after pictures (heavily blurred and distorted to hide the company) before after When in an incognito window in Chrome it does not happen, but I have tried erasing my cache and cookies in Chrome, and it still happens in my main window. It also does not happen in Opera.

This is also a different computer than the one I used at the other company. There is obviously something saved in chrome between the usage of the two different computers, but it's not the normal cookies or cache as I have cleared those.

EDIT: I was able to find the source of the redirect was a function called "GetUserRealm", and somehow, on a connected chrome browser, it finds my old company. But other browsers and incognito windows do not. Doesn't matter how many times I clear my cache for the Microsoft sites.

  • Is this the same PC? Perhaps clear your cache and browser history.
    – DankyNanky
    Aug 31, 2017 at 8:21
  • 1
    Try the solution of adding &prompt=login to the query string generated by the ADAL JavaScript when redirecting to login.microsoftonline.com (more info).
    – harrymc
    Aug 31, 2017 at 8:25
  • 1
    Does this happen on any other computer? Try visiting the page in "incognito" mode. Unless you've got an old cookie, or password manager automatically filling out things for you, what you are describing is not possible. The login page behaves according to whatever domain you type in. There's no way Microsoft is going to redirect you from one domain to a completely unrelated and different domain. How do you know it's redirecting to the "old" company? Sep 2, 2017 at 5:07
  • 1
    Consider adding some screen shots of the process you follow masking out the email address portions you want to keep private. Do a screen shot of before, during, and after or find a way to make a moving GIF and mask out the sensitive information from it. I like the two comments left right above this one as those sound like potential solutions to this problem—I still think having a way to give people a visual would help clarify what you are seeing exactly since we can't just come on over and say "we're here, show us what you have going on with this". <::;;::;;::;;::{[||||||]}o Sep 2, 2017 at 15:44
  • 1
    I've noticed that to really get rid of cookies, I have to use Chrome's developer tools. So, open developer tools on the page, choose the Application tab, open the Cookies dropdown under Storage on the left, select one, then choose Clear All icon (in-between refresh icon and close icon just above the cookie name column). But doing this on the site before redirect to sso may be a bit tricky. You'll need to disable Javascript first, delete the cookies, re-enable javascript. Sep 5, 2017 at 16:50

7 Answers 7


One way that worked for me: delete the cookies for login.microsoftonline.com in Chrome.

You can go directly to the relevant cookies in Chrome's Settings if you cut'n'paste this into the address bar:


  • This solution works for me but I had to do the same for outlook.office.com
    Mar 3 at 12:53

I've noticed that to really get rid of cookies, I have to use Chrome's developer tools.

enter image description here

So, open developer tools on the page, choose the Application tab

enter image description here

open the Cookies dropdown under Storage on the left, select one, then choose Clear All icon (in-between refresh icon and close icon just above the cookie name column).

enter image description here

But doing this on the site before redirect to sso may be a bit tricky. You'll need to disable Javascript first, by adjusting the developer settings found on the right side of the developer menu bar:

enter image description here

enter image description here

close the settings, refresh, and delete the cookies. When done, re-enable javascript in the settings.

Hopefully that'll do it for you!

  • It actually didn't work :( When I logged into the site from my phone it happened again.
    – avi
    Sep 7, 2017 at 8:55
  • Clearing the cache again and using all sorts of other tools didn't help either, but I did find the source of the redirect. Something called "UserRealm"
    – avi
    Sep 7, 2017 at 10:03
  • All your screenshots were from computer. Your phone is just another device caching the same information. Just uninstall chrome from your device, clear cache data, reinstall. Sep 7, 2017 at 10:16
  • It turns out the data didn't come from the cache, but from the password storage settings.
    – avi
    Sep 7, 2017 at 10:22
  • 1
    incognito mode doesn't give me options to use stored passwords.
    – avi
    Sep 7, 2017 at 11:12

To prevent a login redirect I use the Manage other people feature of Google Chrome on both a Mac and Win PC.

I have login accounts with different permissions so that I can both administrate sites, and then go in and double-check what the end users experience with their permissions. The same idea applies to different users altogether.

In the Chrome browser first go to the Other Options (three dots) in the upper right, Settings, Manage other people, Add Person, create a name for the Person, choose an Avatar, and click Add.

When you enter a new Chrome window you'll see the chosen Avatar next to the Other Options button in the upper right. Login to Office 365 using the credentials desired for that user. [You might wish to then save a bookmark to the Bookmark Bar or drag the URL to the Desktop to create an icon that can be edited too (if desired) - that's optional.]

Next recreate the process for a new Avatar (person) using their login credentials.

When you open future Chrome browser windows, Chrome may default or remember the last user to login in, but you can click on the Avatar and choose the desired Avatar (Person) shown in the dropdown list with their credentials. This will open a new window with that Avatar allowing users to maintain separate login instances for unique accounts without a redirect or need to use incognito or install other browsers.

It's great! You may choose to right-click on the Chrome icon and choose the Person from the pop-up window too.

As long as the login credentials are kept independent of one another, this provides a quick and easy way to administrate a site as Admin and then test the enduser experience as End User, or keep different people using the same PC independent of one another in the same Chrome browser app. Using the "People" feature has saved me a great deal of time and frustration.

I hope this helps - It was frustrating to login with a different username only to be redirected to another user with their credentials from a previous login. Now the hassle of logging in is a problem no more - this works!

I've attached a screen shot for an Avatar (in the upper right) with the cursor on the Manage other people feature in "Settings" for the Google Chrome browser app. [1]: https://i.stack.imgur.com/GYbTa.jpg



FYI: To resolve this issue for any reader using Safari

Go to : Safari > Preferences > Privacy > Manage Website Data > Search: "Office" > then delete everything related to Office365


Here's the solution that worked for me. In my case, the redirection was happening because other search engines had added themselves to my "default search engine" list in chrome's settings. Here's how to delete them:

Go to Settings -> Manage Search Engines -> Delete every search engine under the header "Default Search Engine" (click on the three dots beside the undesired search engine's name and select "remove from list")

And voila! It worked for me. No more redirecting. Hope that helps somebody else too.


In the end, after being frustrated by Microsoft customer support not helping me, I found out the source of the problem was a stored username/password in chrome.

I deleted the stored password in Settings -> Manage passwords section, and I no longer have the issue of the attempted redirections.


So here is what I found out and what worked for me.

1) I use chrome so not sure on other browsers.

Normal people think “delete all cookies” means it will delete all cookies. Turns out this is not the case with how Microsoft has setup windows 10.

2) I installed cookie manager

3) clicking “delete all cookies” from cookie manager actually deletes all cookies unlike the method that should delete all cookies.

After I did this.. outlook no longer redirected me to an old job site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.