Use Flow designer to add/remove users from a Microsoft Exchange Distribution List

David Trotta
Tera Contributor

Hi Developer Community,

 

Does anyone have any experience building a flow in Flow designer to add/remove users from a Microsoft Exchange Distribution List in a cloud environment?  My flow is using the Microsoft Entra spoke and Look up User and Azure AD Connection (Use Default Connection) as the Action Properties.  Then, I'm using the User Principal Name (UPN) as the action input, plus the unique Object ID (Group ID) of the Exchange DL, but it is not working.

 

I am currently getting the below runtime value under the Output Data when looking at the Execution Details in Flow Designer.


"Action Status": {
"code": 1,
"message": "Error: Unknown Error (Process Automation.bc3088ea0bd4a110cfed40976877b252; line 6)"

 

Any thoughts?

7 REPLIES 7

Steven,

 

Below is the last update I received from Now Support.  They are saying there is no current OOB solution and they recommend a customization such has using a PowerShell script.  Based on their response and multiple failed attempts at trying an OOB spoke, I abandoned the effort for now.  I may revisit in the future.

"OOTB does not support user management (Add /Remove users) from an Exchange distribution list.  The Microsoft Exchange Online spoke in ServiceNow does not natively support managing distribution list (DL) membership. Its built-in actions focus on email, calendar, and mailbox operations—not group membership management.

https://www.servicenow.com/docs/bundle/yokohama-integrate-applications/page/administer/integrationhu...

 

I would suggest one custom implementation (please note our support channel does not support custom implementations)

For example:
Write a custom PowerShell script and use PowerShell Step Action to call that script."

Yea I was under the impression we are going to need to use a custom Powershell script, which we plan on doing.

 

I did wonder if I can script my own rest message, but I don't think that graph api connector will support it...I could be wrong.  I built my own script for Entra for adding/removing users from groups so I didn't have to use Flow Designer...was going to try and do it for this once we got the oAuth app setup for Exchange Online, but I don't think that connector is going to work via a script like Entra groups.

 

If we get a Powershell script for this, I will come back to this thread and share.


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

Thank you Steven!  That would be much appreciated.