This is an example setup with NetBox using AzureAD for authentication. It uses the Python Social Auth library.
Most of this was taken from this gist: https://gist.github.com/leoluk/16d91ec22d833945c7ac7ed2b3b05a27
This is written to support NetBox v2.10 to v3.0. I'll try to note differences for 2.9 or earlier.
NOTE: NetBox v3.1 added basic support for using social_auth so most of this is no longer required and can be placed in the configuration.py
file.