0

I want to restrict the users to one tab for one applcaion. I am currently using Azure AD based Authentication in my application.But the users logged in one tab and opening the application in other tabs.Now I want to show a alert like the user is already logged in in another window/browser/device.Please logout and try to login again .

Please let me know how should I know whether the users is logged into particular application or not using Azure AD

astaykov
  • 30,768
  • 3
  • 70
  • 86
  • You can use HTML5 local storage . Please read below post https://stackoverflow.com/questions/9742395/scope-of-sessionstorage-and-localstorage – Gaurav Moolani Oct 25 '18 at 14:06

1 Answers1

0

You cannot do this in Azure AD. You have to manage that in your application. Because it is your application that sends session cookie to the browser.

There is of course also an SSO Session with Azure AD, but this is out of game once your user authenticates successfully and your application sends its own session cookie. And while you can determine usage of different browser on the server side, there is nothing on the server side to help identify a browser window instance. And no way to recognize a browser tab on the server.

In order to achieve what you want, you have to combine client side (JavaScript) + server side (back-end) technologies to be fully able to identify usage in another tab or browser instance. And this neither Azure AD nor Azure specific.

astaykov
  • 30,768
  • 3
  • 70
  • 86