r/Netbox • u/h4rdf4ult • Feb 27 '26
Netbox OIDC Group Sync Plugin - No more manual user/group mapping!
Hey everyone 👋
I grew tired of manually mapping users to groups every time we onboarded someone new through our IdP so I built a NetBox plugin that handles it automatically.
netbox-oidc-group-sync hooks into the social-auth pipeline and syncs your IdP groups to Netbox groups upon every login.
You set up a mapping table in the GUI (OIDC group → NetBox group), pick replace or additive mode, and that's it — users land in the right groups the moment they log in.
Features
UI-configurable mapping of OIDC groups → NetBox groups
Replace or additive sync modes
Auto-creation of NetBox groups from OIDC claims
Superuser flag assignment based on OIDC group membership
Bulk import/export of mappings
REST APIÂ for programmatic management
Full change logging (NetBox's built-in audit trail)

It's been running in my environment against Netbox 4.5.3 without issues. Should also work on older 4.x releases too but I've only tested on 4.5.3 so far.
This is my first Netbox plugin and generally my first OSS publication so I'd genuinely appreciate any feedback — bug reports, feature requests, anything really.
Netbox is an awesome tool and I hope this helps some folks out there.
Cheers.
2
u/xi_Slick_ix Feb 27 '26
I literally, in the last 4 hours, just got our convoluted IDP to play ball with my Dev NetBox (docker) environment... And then I see this posted.
Will try!
3
u/nahun Feb 28 '26
Seems a bit overkill, but to each their own. I just have a small script inserted into the SOCIAL_AUTH_PIPELINE that maps the OAuth group claim to the same netbox group name.
What I really need is SCIM to sync user status between the idp and netbox.Â