How to Filter Azure AD Groups in SAML Claims
Question details
The user needs to configure an Azure AD SAML application so the group claim includes only groups matching criteria such as names containing “Admin,” instead of sending all group names.

- Product
- Azure Active Directory / Microsoft Entra ID SAML application
- Device & OS
- not provided
- Scenario
- An administrator is setting up SAML single sign-on and wants to restrict the group claim to groups whose names contain “Admin.”
- Observed behavior
- The SAML application currently sends group names in the group claim without a name-based filter applied.
Before changing claim rules, confirm you have Application Administrator or Global Administrator access to the Microsoft Entra admin center and verify the SAML application supports filtered group claims or custom claim mapping.
Check Microsoft Entra ID SAML group claim filtering options
Use this first to configure only the group claims that your SAML application supports, instead of relying on unsupported regex, PowerShell, or Graph API filters.
Azure AD / Microsoft Entra ID exposes group claim settings in the enterprise SAML application. The exact filter options vary by tenant and application, so confirm the current settings before applying a filter.
Sign in to https://entra.microsoft.com with an account that has Application Administrator or Global Administrator permissions.
Go to Identity > Applications > Enterprise applications and select the Azure AD SAML application you need to update.
Under Manage, select Single sign-on, then in the Attributes & Claims section select Edit.
Select the group claim, then review the available group claim source and filter options such as groups assigned to the application or a specific group type.
Choose the option that matches your policy, save the configuration, and test the SAML token. Do not rely on regular expressions, PowerShell, or Graph API unless the application and tenant are confirmed to support them.

Limit group claims by assigning only the required groups to the app
Use this when you can control which groups are linked to the SAML app and want group claims to reflect assigned groups only.
Confirm current support in the Azure Active Directory community and Microsoft documentation
Use this when the built-in group claim settings do not provide a direct name-pattern filter and you need the latest support guidance.
Use WPS Office as a Free Microsoft Office Alternative for SAML-Protected Teams
WPS Office is a free, lightweight Office suite that opens and saves Microsoft Office formats with high compatibility. It offers a familiar ribbon interface and seamless migration, making it a practical companion for teams that use Azure AD or Microsoft Entra for identity while working in Word, Excel, and PowerPoint.

Frequently Asked Questions
Can Azure AD filter group claims by regex in SAML tokens?
Microsoft Entra ID does not guarantee regex-based group claim filtering. Use the supported group claim settings in the SAML application and confirm current Microsoft identity documentation before applying any pattern-based filter.
Where do I edit the group claim for an Azure AD SAML application?
Open the Microsoft Entra admin center, go to Identity > Applications > Enterprise applications, select the app, then go to Single sign-on > Attributes & Claims and edit the group claim.
Why are all groups appearing in my Azure AD SAML token?
This usually happens when the group claim is configured to send all groups. You can reduce the scope by choosing groups assigned to the application, a specific group type, or another supported filtering option.
Can I use PowerShell or Graph API to filter Azure AD group claims?
Only if you confirm that the SAML application and tenant support custom claim mapping. Otherwise use the Microsoft Entra admin center supported group claim options and check the Azure Active Directory community for current guidance.




