SAML group attribute filter by active directory

For SAML apps is there a way to filter the group attribute by active directory? I believe for OIDC apps, groups can be filtered via an expression such as Groups.startsWith("active_directory","",100), where “active_directory” is the specific directory we are filtering for. Is this possible for SAML?