Skip to main content
Question

Adding/Removing Users to Distribution Lists/Shared email box

  • April 8, 2026
  • 8 replies
  • 57 views

  • New Participant

I want to automate adding/removing users in DL/Shared email box through Agent Studio. If the requestor is owner of the group then it is a straight-forward journey of adding/removing users in DL but if the requestor is not the owner then I am using “mw_generic_approval_request” in Compound Action to send the approval to the Owner of the DL. Is it possible to intercept the Approval/ Denial by the bot and then send a notification to the requestor that the Approval has been given and then proceed with adding the requested users to that respective DL.

8 replies

Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • April 8, 2026

Hey ​@SG1 - if you are using a compound action as you mentioned there’s no need to do any intercepting. You can add a `switch` expression after your `mw_generic_approval_request` action that checks if the request was approved or denied and then send a message to a user with `notify`

 


Forum|alt.badge.img+2

hi SG1, i used the generic approval in a previous Agent Studio plugin and this was the exact behavior i was after. i used a compound action because the steps run asynchronously and i had many of them, so i needed a way for the plugin not to timeout. when the approval was generated, it sent to the target “approver” (i used one of the built in attributes “MANAGER” for my use case), and i had our bot update the user when the approval had been sent. when the approver approved/denied, i also had an update sent to the user so they were aware.

if i remember correctly, the approval hangs for 72hrs before it times out? someone will probably correct me on that. hope that’s helpful!


  • Author
  • New Participant
  • April 8, 2026

hi ​@chaney.zimmerman ,

 

Thank you for your quick reply. One important question,how can we send a update to the user on the approver’s approval or denial?


Forum|alt.badge.img+2

hi ​@SG1 ! in our case we used what ​@Kevin Mok mentioned above, i think i was typing my reply as he sent his message as well 😅

in the approval action, i used the “progress_update” arg to send a “on_pending” message once the approval had been sent to the approver that informed the requestor the process was waiting on the approval. then sent an “on_complete” message to let the requestor know the approver had either approved or denied. immediately after the approval action though, is a switch expression that waits on the “data.approval_result” (or whatever you name the output of your approval to) to resolve, which is what Kevin suggested above.


Forum|alt.badge.img+2

it may be better to use the “notify” action as Kevin mentioned, though, thinking about it now. that would ensure that the notification comes to the user after the approval step is finished :) 


  • Author
  • New Participant
  • April 13, 2026

hi ​@Kevin Mok ,

 

Does Microsoft Graph provides API’s for all kind of DL’s to add/remove a user?

If not, what kind of DL’s are restricted. If you could share that information, that would be really helpful.


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • April 13, 2026

Hey ​@SG1 - I don't have a list of what API endpoints Microsoft Graph has. I would definitely recommend that you look at their documentation or ask an AI such as ChatGPT to give you a rundown of what you can do and cannot do. 

I also cannot tell you about what DLs are restricted. That's mostly Microsoft Graph landscape so you may have to do some digging there 


  • Author
  • New Participant
  • April 13, 2026

sure ​@Kevin Mok .Thanks.