'Django login integration with Microsoft AD

I successfully managed to integrate Microsoft Azure AD login on my Django site, but how do i make it such that users are always logged out after the browser is closed (i.e. have to login using Microsoft AD each time they access the site)? I dont know how to integrate Django sessions with request.identity_context_data

Followed the tutorial here:

https://github.com/Azure-Samples/ms-identity-python-django-tutorial



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source