snok / django-auth-adfs

A Django authentication backend for Microsoft ADFS and AzureAD
http://django-auth-adfs.readthedocs.io/
BSD 2-Clause "Simplified" License
270 stars 97 forks source link

Django admin UI page: Oauth 2 isn't working #326

Open sbordiya opened 5 months ago

sbordiya commented 5 months ago

I've a django angular application. The accessTokenAcceptedVersion =1 on my azure app manifest works for django admin (http://localhost:8000/admin) but when I change it to version accessTokenAcceptedVersion =2 it stops authenticating and shows me message as "login failed".

I'm using MSAL for the angular side which works with accessTokenAcceptedVersion =2. How do i enable django side to work Oauth 2.0? Here is my stack:

Python== 3.9.18 Django==3.2.* angular==15.2 msal-angular==2.5.8

Thank you!

Upvote & Fund

Fund with Polar

JonasKs commented 5 months ago

Have you also configured django-auth-adfs to use token version 2?

Please also read the troubleshooting section in the docs.