최고의 답변자
Multiple login prompts after call logout page.

-
There are some cases that my Sharepoint 2013 farm application must force the user to logout.
In order to logout the user, the app redirects the user to closeconnection page:
~/_layouts/15/closeConnection.aspx?loginasanotheruser=true
This really log the user out, but also calls several login prompts.
Sometimes it prompts 11 times or 12 times the same login prompt.
The application authenticate via AD so I have no idea why is this happening, since I don't have control over the prompt.
질문
답변
-
I've found the problem!
Another developer has put a webpart with an iframe in the homepage.
For some reason this frame was hidden but was leading to another home page.
This other page was requesting for login and because of a bug, it was showing the prompt multiple times.
I've removed the webpart and now the login prompt is appearing two times, it's not perfect but will serve.
- 답변으로 표시됨 Guilherme Batista 2018년 7월 20일 금요일 오후 6:25
모든 응답
-
Hi,
This is a expected behavior, the url "~/_layouts/15/closeConnection.aspx?loginanotheruser=true" is used to sign out current user and then switch to another user account, so it will promote for a new user credential.
I understand that you may want to logout user after some time, if that is the case, please do like this, redirect user to the signout page:
setTimeout(function(){ window.location.href = _spPageContextInfo.webServerRelativeUrl + "/_layouts/signout.aspx"; }, 1200000);
Thanks
Best Regards
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams. -
Hi Jerry,
Thanks for reply.
I understand that page return a prompt, but it is return eleven times or more!
You can see in the image, each "accessdenied" line is a login prompt. The user must fill each prompt one by one until be authorized.
You see, I cannot force the user to insert their credentials eleven times and I have no idea why this is happening.
-
Hi,
I used the html hyperlink below and it only promote the window only once, reenter the credential and user will sign in which won't promote multiple times:
<a href="javascript: (function(){if (typeof SP !== 'undefined') { var ctx = new SP.ClientContext.get_current(); var site = ctx.get_site(); ctx.load(site, 'Url'); ctx.executeQueryAsync(Function.createDelegate(this, function (sender, args) { var url = site.get_url(); window.location = url + '/_layouts/closeConnection.aspx?loginasanotheruser=true'; }), Function.createDelegate(this, function (sender, args) { alert('Error: ' + args.get_message()); })); } else { alert('Error: This is not a SharePoint 2010 or 2013 website'); }})();">SP Loginout</a>
You could try this in your side and more information about using closeConnection page:
How to Sign in as a Different User in SharePoint 2013
Thanks
Best Regards
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.- 답변으로 제안됨 Wendy DZMicrosoft contingent staff, Moderator 2018년 7월 17일 화요일 오전 7:42
-
-
Hi,
You could compare the server configuration between the two application to see if there is some difference between them and then fix it.
Thanks
Best Regards
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams. -
Hi,
Never mind and if there is any updates, please post back and share with us.
Thanks
Best Regards
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams. -
I've found the problem!
Another developer has put a webpart with an iframe in the homepage.
For some reason this frame was hidden but was leading to another home page.
This other page was requesting for login and because of a bug, it was showing the prompt multiple times.
I've removed the webpart and now the login prompt is appearing two times, it's not perfect but will serve.
- 답변으로 표시됨 Guilherme Batista 2018년 7월 20일 금요일 오후 6:25