Logging in/out of Teams + SharePoint

Frequent Contributor

I work in an education context but posting here with the hope of reaching a larger audience and therefore a greater probability of receiving a solution. The problem is not limited to the educational version of Teams.

A few of our teachers have started developing course pages in SharePoint, as was explained by Dr David Kellermann, and attaching those as Tabs in Teams. The problem is this: when a learner logs out of Ms Teams, he/she is not logged out of SharePoint. In families where they share devices, when the sibling logs into Teams and wants to access a SharePoint course page - they cannot. SharePoint is still trying to authenticate with the previous user's credentials and does not display the page.

I do realize that shared devices should have separate Windows accounts to avoid this problem - however, this is not the case in many homes.

Is this a known issue?

5 Replies

@Marius Pretorius Think of Teams client as a browser, your login keeps you authenticated to anything inside the Teams app, including SharePoint tabs. If I choose the 'open in SharePoint' option to start my browser as well then that will have it's own separate authentication.


Logging out of Teams can't invalidate the browsers authentication, it's a separate app. They log in twice, so need to log out twice.


Through Azure AD you could set a more aggressive session timeout.

Read through here and also about Conditional access which can help here to in certain scenarios and by logging out idle sessions. Theres a a few gottchas so read it all:



Thank you for the response, @Steven Collier and it makes it lot of sense.


Just a clarification: students are not choosing the option to open in SharePoint. They are not even aware that the tab/page inside of Teams originates from SharePoint. Even so, after having signed out of Teams, when the next person logs in, the SharePoint page relevant to their account will not load, it is not using the new user's authentication. I have tested this myself with two different accounts and found this to be the case. I understand why this is happening - it is just non-intuitive for the average user.


Correction: I've just tested the scenario mentioned again - when using the Teams desktop app, I was able to sign in and out as different users and could access SharePoint tabs/pages in Teams without a problem. The previous time I tested, I had probably signed into SharePoint separately. I have not tested this thoroughly in the Web app yet.


I've tested this in the Web app as well. After signing out, I was able to sign into a different account and view the SharePoint page/tab. I did definitely experience problems earlier on which confirmed what the students were reporting. It probably has to do then with not signing out properly as you said @Steven Collier . I'll have to investigate further what leads to the issues experienced.

Thank you for the time you took to respond.


Thank you.

I have since my previous post, got a bit more light on the topic. It seems that students on a shared device can close Teams in the browser which, it seems, signs them out of Teams - or at least allows another user to sign into Teams as a different user. The SharePoint account is still signed in with the previous user. When the new user attempts to access a SharePoint page from within Teams, they are not given access.

The solution is to (in Teams Web app) click on your profile picture and choose sign out. You are then provided with a list of user accounts and asked to pick one from which you want to sign out. Select the one of the previous user (which will show in the list), since that is the problematic one. You will need to sign in with your own account again (although you didn't actually sign out of your account). Now you will be able to access the SharePoint page.

So a lot of signing in and out. It can be a little confusing to the novice. Hopefully, I've made some sense.