If you're looking to sync roles from a SCIM directory (like Okta or Azure AD) this is super easy to do with WorkOS. Already being used by Vercel, Planetscale, Loom, and others.
While I haven't gone too deep on that yet, I was thinking we'd take inspiration from how GitHub maps IdP groups to native GitHub teams. So first step here would be adding user groups/teams natively in the product.