Is there a OOB solution for add/remove user to DL list in Outlook ?

NARENDRA KAMMIL
Tera Contributor

Hello 

I'm trying to figure out how to use ServiceNow to add or remove users from the Outlook distribution list.

Please advise me on how to configure this if it is possible.

Ex: DL-ITSM-ServiceNow@servicenow.com

 

 

All our DL emails are in Microsoft 365, We do have integration hub , Cannot see any thing in microsoft 365 spoke documentation. 

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi @NARENDRA KAMMIL 

an integration in ServiceNow is never a full replacement of the connected application and will cover some functionality aspects only. So if the spoke does not provide a way to manage distribution list of o365 then there is no chance to do this in ServiceNow.

Maik

Kai Tingey
Tera Guru

Hi Narendra

 

If you have a hybrid environment and the group is available in AD, You can use the OOB activity "add user to group" from the Microsoft AD spoke. 

 

If it is purely 365, you would most likely need to create a custom action in flow designer and run powershell to connect to the cloud and do it.

 

to do so you need a service account that has the appropriate roles in exchange.

then you need to set up a connection alias in servicenow with those credentials

then in your custom activity, you will need to specify that "credType" is "AD" as an input variable, and pass through the values you need for your ps script. 

e.g.

KaiTingey_0-1706067514234.png

 

this example is for giving a user permission to a shared mailbox, but the principal is the same.

 

then all you need to do is write your powershell, something like:

import-module ExchangeOnlineManagement
connect-exchangeonline -credential $cred
Add-DistributionGroupMember -Identity $mailbox -Member $user

 

 from experience, it's worth evaluating the output for errors - otherwise the step will always show as successful even if it doesn't work. it will return it's data through the output, you can just scan for phrases and assign them to error codes like so

 

KaiTingey_1-1706067852997.png

If that helps or answers your question, please click the appropriate button 🙂

Thankyou so much , let me try this custom path and Will keep you posted 

Amit Verma
Kilo Patron
Kilo Patron

Hi @NARENDRA KAMMIL 

 

Please refer the below documentation for Microsoft AD Spoke setup and make use of Add Users to Group action.

https://docs.servicenow.com/bundle/vancouver-integrate-applications/page/administer/integrationhub/c...

 

Another way possible to achieve this is via a Mid Server PowerShell Script file running through a Mid Server with a PowerShell step that can add users to a DL via Exchange Online Management PowerShell module cmdlets. If you need help with the scripting on this, please let me know and I will be happy to assist.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.