The CreatorCon Call for Content is officially open! Get started here.

How to get DL members from AD

mdsannavulla
Kilo Guru

Hi All,

Can we get DL(distribution list) members to ServiceNow from AD?

3 REPLIES 3

Deepak Ingale1
Mega Sage

Get-DistributionGroupMember -Identity "DL Name goes here"



You can use this powershell command to get DL members.


Oops, I misunderstood user question. sorry. I thought how to get DL users of AD.


poyntzj
Kilo Sage

Our LDAP's import these attributes



sAMAccountName,givenName,sn,cn,mail,userPrincipalName,telephoneNumber,mobile,Company,Department,co,c,l,title,physicalDeliveryOfficeName,manager,userAccountControl,managedBy,member,members,distinguishedName,objectGUID,msExchCoManagedByLink,GroupMCompany,objectClass,whenCreated



Do an LDAP import of the group that targets the sys_user_group table



Add this as an onStart script for the transform map


gs.include("LDAPUtils");


var ldapUtils = new LDAPUtils();


ldapUtils.setLog(log);



Use this as an onAfter script for the transform map


ldapUtils.setMemberField('u_member');


ldapUtils.addMembers(source, target);