Title: Endless redirect
Last modified: June 6, 2019

---

# Endless redirect

 *  [vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
 * (@vladislavunterberg)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/)
 * Hello. When you try to log in, if the user is not registered in the admin area,
   many times redirects to the login Microsoft. As a result, we receive a message
   that you cannot log in with these credentials. Is there any way to reduce the
   number of redirects? We can throw off a link to the site, so you can see for 
   yourself.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Marco van Wieren](https://wordpress.org/support/users/wpo365/)
 * (@wpo365)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11611827)
 * Hi [@vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
   Most likely this is caused by WordPress adding an extra redirect, probably as
   a result of permalink-configuration … I recommend that you try and reproduce 
   the error e.g. with Chrome with **F12 Dev Tools** > **Network** tab opened. Make
   sure you check the **Preserve log** option. My guess is that you see an extra
   redirect e.g. from [https://www.example.com/wp-admin](https://www.example.com/wp-admin)
   to [https://www.example.com/wp-admin/](https://www.example.com/wp-admin/) … In
   this case (most likely due to an entry in your .htaccess or similar) the user–
   when being redirected from Microsoft back to your website – is immediately redirected
   again once more by your website. When this happens, the ID token will be removed
   from the request and the plugin never receives the information needed to log 
   in the user. Another reason could be when you allow multiple URLs for the website
   e.g. [https://example.com/](https://example.com/) and [https://www.example.com/](https://www.example.com/)…
   In this case the user is most likely signed in for one URL but not for the other…
 *  Thread Starter [vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
 * (@vladislavunterberg)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11612076)
 * On localhost I’m getting the usual WP authorization form, but on the host I get
   a lot of redirects
 *  Plugin Author [Marco van Wieren](https://wordpress.org/support/users/wpo365/)
 * (@wpo365)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11612094)
 * Hi [@vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
   Can you maybe send me an export of the the network traffic logged e.g. with your(
   Chrome) browser? I believe you know the email address 🙂 But otherwise you can
   use the contact form on the website [https://wwww.wpo365.com/contact/](https://wwww.wpo365.com/contact/)…
 *  Thread Starter [vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
 * (@vladislavunterberg)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11612188)
 * I sent log on your email
    -  This reply was modified 7 years ago by [vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/).
 *  Plugin Author [Marco van Wieren](https://wordpress.org/support/users/wpo365/)
 * (@wpo365)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11612414)
 * [@vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
   Thanks for the log … What I can see is that you try to navigate to WordPress 
   Admin and the plugin then redirects you to Microsoft (which is OK). Then Microsoft
   redirects you back and the plugin receives the ID token correct. However, since
   you’re using the free version and probably didn’t manually create a matching 
   user, the plugin sends the user to default login form with an error code (basically
   telling you to create the user manually or upgrade). However, it seems, from 
   the log, that as soon you hit the login form, you’re being redirected again to
   Microsoft. This tells me that you’ve probably deleted the entry /wp-login.php
   from the **Pages blacklist**. Now the plugin doesn’t understand that /wp-login.
   php is a page that should be excluded from authencation. In case you cannot stop
   the loop anymore, you should delete the option **wpo365_options** from the wp_options
   table (and re-configure the plugin).
 *  Plugin Author [Marco van Wieren](https://wordpress.org/support/users/wpo365/)
 * (@wpo365)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11613198)
 * Hi [@vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
   Any luck resolving this issue?
 *  Thread Starter [vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
 * (@vladislavunterberg)
 * [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11614726)
 * Yes, it did. Thanks so much. Indeed, wp-login has been removed from pages blacklist.
   More precisely wp-login was, but in a slightly different form, changed the setting
   when migrating from localhost. You’re helping me out a lot.)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Endless redirect’ is closed to new replies.

 * ![](https://ps.w.org/wpo365-login/assets/icon-256x256.png?rev=2683314)
 * [WPO365 | SEAMLESS WORDPRESS + MICROSOFT INTEGRATION (WPO365 | LOGIN)](https://wordpress.org/plugins/wpo365-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpo365-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpo365-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wpo365-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpo365-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpo365-login/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [vladislavunterberg](https://wordpress.org/support/users/vladislavunterberg/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/endless-redirect-2/#post-11614726)
 * Status: not resolved