Django Azure SSO

I am using django_auth_adfs to log in to the Azure AD using SSO.

I have the following settings in settings.py

AUTH_ADFS = { "AUDIENCE’: client_id, ‘CLIENT_ID’: client_id, ‘CLIENT_SECRET’: client_secret, ‘CLAIM_MAPPING’: {‘first_name’: ‘given_name’, ‘last_name’: ‘family_name’, ‘email’: ‘upn’}, ‘GROUPS_CLAIM’: ‘roles’, ‘MIRROR_GROUPS’: True, ‘USERNAME_CLAIM’: ‘upn’, ‘TENANT_ID’: tenant_id, ‘RELYING_PARTY_ID’: client_id, }

LOGIN_URL = “django_auth_adfs:login” LOGIN_REDIRECT_URL = “/adf”

And in urls.py file, I have the path defined for oauth2.

urlpatterns = [ … path(‘oauth2/’, include(‘django_auth_adfs.urls’)), … ]

I need to send the response with attributes back to the front end. With the above configuration. But I am unable to capture the response. I am a newbie to django. How can write a function using Djange to capture the response from the Azure AD?