Hello
I am afraid this does not solve my problem that's about retrieving attributes "sn" and "mail" of all users in a OU (not Group members)
But I think to have solved using a couple of AD tasks. The first
Using the query: SELECT ADspath FROM 'LDAP://WIN-2016-AD/OU=TESTT_PF2,DC=bbmilano,DC=it' WHERE objectclass=user”
I populate a dataset (called OU) with all users under TESTT_PF2 Organizational Unit. This query doesn't allow to extract "sn" and "mail" attributes
The second AD task (in a loop)
LDAP://WIN-2016-AD/CN=%OU.Name%,OU=TESTT_PF2,DC=bbmilano,DC=it
It reads all Users in the OU dataset and write "sn" and "mail" attribute (this function allow to do it) in variables SURNAME and MAIL created at the beginning of Automate workflow
At the end a WRITE function put these variable in a text file as asked by customer. This file is something like that:
"Smith","pf3@bbmilano.it"
"Taylor","pf4@bbmilano.it"
Hope helps
Giovanni