Hi Hubert,
We tried by creating a virtual Attribute Mapping (using expression shown below) in User Directory to filter a set of groups. Then in the SAML Attribute section, used FMATTR:VirtualAttributeName to send filtered groups in separate attribute value.
Name: GroupNames
Expression: Filter(ENUMERATE(Get('memberOf'),STRING(RDN(STRING(%0),FALSE))),'*Application1*')
Used FMATTR in federation partnership to send values in separate attribute values.

Got below Output
<ns2:Attribute Name="GroupNames"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<ns2:AttributeValue>Application1-Group1</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group2</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group3</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group4</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group5</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group6</ns2:AttributeValue>
</ns2:Attribute>
But in our case, we want to filter groups which has Application1 in the value and also the groups which has Application2 in the value. Tried using below expression but wanted to send those group values in separate attribute values.
filter(ENUMERATE(Get('memberOf'),STRING(RDN(STRING(%0),FALSE))),'*Application1*')+","+filter(ENUMERATE(Get('memberOf'),STRING(RDN(STRING(%0),FALSE))),'*Application2*')
Expected result as shown below.
<ns2:Attribute Name="GroupNames"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<ns2:AttributeValue>Application1-Group1</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group2</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group3</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group4</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group5</ns2:AttributeValue>
<ns2:AttributeValue>Application1-Group6</ns2:AttributeValue>
<ns2:AttributeValue>Application2-Group1</ns2:AttributeValue>
<ns2:AttributeValue>Application2-Group2</ns2:AttributeValue>
<ns2:AttributeValue>Application2-Group3</ns2:AttributeValue>
<ns2:AttributeValue>Application2-Group4</ns2:AttributeValue>
</ns2:Attribute>
Can you provide any suggestion on how to make this working.
Regards,
Himavanth