Install & Compatibility
Where this runs
tested against v1.16.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 86.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.8s · import 0.000s · 87MB
86MB installed
● package 86MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AuthenticationBackend
✓ from django_auth_adfs.backend import AuthenticationBackend
✗ from django_auth_adfs.backend import AuthenticationBackend
Configure ADFS backend, claim mapping, and include OAuth2 URLs.
# settings.py
INSTALLED_APPS = [
...
'django_auth_adfs',
'django_auth_adfs.drf', # optional: for DRF integration
]
AUTHENTICATION_BACKENDS = [
'django_auth_adfs.backend.AuthenticationBackend',
'django.contrib.auth.backends.ModelBackend',
]
AUTH_ADFS = {
"SERVER": "adfs.yourorg.com",
"CLIENT_ID": "your-client-id",
"RELYING_PARTY_ID": "your-rp-id",
"AUDIENCE": "microsoft:identityserver:your-rp-id",
"CA_BUNDLE": "/etc/ssl/certs/ca-certificates.crt",
"CLAIM_MAPPING": {"first_name": "given_name", "last_name": "family_name", "email": "email"},
}
# urls.py
from django.urls import path, include
urlpatterns = [
path('oauth2/', include('django_auth_adfs.urls')),
]
# Quick login: go to /oauth2/login
Upgrade
Version history
1.16.0latest on PyPI · released Jan 8, 2026
Audit
Dependencies
DjangorequiredCore framework; requires >=3.2
cryptographyrequiredToken validation and JWKS handling
requestsrequiredHTTP requests to ADFS/Azure AD endpoints