Entra 150 Groups Per User Limitation
Issue
Azure AD sends up to 150 groups in the groups claim. When using Azure AD with SAML Group Sync, if a user in your organization is a member of more than 150 groups, Azure AD sends a groups claim attribute in the SAML response for group overages, and the user may be automatically removed from groups.
Solutions
- Keep users below 150 groups
- Use Entra specific integration in your applications like Gitlab’s Microsoft Azure Active Directory integration
- I think this fundamentally excludes “SAML” as a solution, you are now seeking “Entra” authentication rather than the universal “SAML” connector
- Use filtering on the Enterprise application, this makes the SAML assertion only contain groups that match the filter. If the filter results in a group list less than 150 the assertion will be made as expected with no overage response.
- Navigate to Entra > Enterprise applications and open your SAML application
- Select “Single sign-on” in the left sidebar
- Select “Edit” on “Attributes & Claims”
- Under “Additional claims” click on the “user.groups” value to expand the right sidebar
- Expand “Advanced options” and tick “Filter groups”
- Attribute to match: “SAMAccountName”
- Match with: Appropriate selection for your goal
- String: plaintext string to match, this field is not regex best I can tell