- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2022 07:47 PM
Hi all,
I am trying to find some information/documentation on how to add user to a shared mailbox using IntegrationHub with Microsoft Exchange Online spoke - Looking at the spokes documentation, it seems that there is no ootb action such as "Add user to mailbox" to give full access or send as kind of access.
I have found the information on how to do this via Orchestration activities where you add scripts to run Exchange online powershell commands - however, using the Exchange online spoke directly connected to the Exchange online > I was hoping to see an action that could be used to just "Add user to mailbox" with appropriate permissions.
If anyone has used the spoke for doing such things - Any information or documentation on this would be helpful.
Thanks.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 03:18 PM - edited ‎12-02-2022 03:23 PM
Hi @Kevin Moore @Jennifer Doll @RobertR1 ,
Sorry i have not been looking at the emails recently thats why could not reply. Here is what you need to setup the add user to mailbox:
- You need EXO PS module installed on your mid server:
https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps
https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.0.0
- The OAuth 2.0 EOL connection is fine, you also need a credential to run PS scripts on your EOL environment - hence on the doco there is a step for Windows credential - however, i would suggest not to use basic outh username password method - Instead you need this credentials setup through a certificate - This below will help - This certificate thumbprint needs to be than added to the mid server so we can use it on the connect EXO cmd on mid server script file:
https://learn.microsoft.com/en-us/powershell/module/exchange/connect-exchangeonline?view=exchange-ps
https://office365itpros.com/2020/08/13/exchange-online-cba/
- Mid server script file attached - please add your certificate thumbprint, clientid, org domain - make sure your org domain is @mydomain.onmicrosoft.com.
- on the mid server script actual Add-MailboxPermission command - I have two cmd line - one for adding user to full access and second for adding user to send as access - update as per your requirement:
$mailboxname This is the variable you need to pass the mailbox email address
$user This is the variable you need to pass your user email address
Next the Flow custom action as below:
I only needed two input for this - add/update as you required, you can see the two variable above that i mentioned is in here and the name matches to the PS cmd in the mid server script file:
To your question @Mark that you could not change the mid server script is because you were trying to change on the OOTB action - it does not allow on OOTB (I am guessing you have already figured this out but fyi) Below is where you add the mid server file that i have attached here.
On this same page further down make sure you map those input variables:
The next error handling part i am just using the ootb by changing the variables to mine.
I hope this will get your setup running.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2022 09:29 AM
Hi Sam,
Were you able to find a Solution? I'm currently facing the same issue you were at the time. I wondered whether the Create Mailbox Action could be used for this purpose by "creating" an existing Mailbox and adding Users, however it returns an error, so it says in the documentation.
I began to wonder, if I have to use the AD or Azure AD spoke to give the user permission.
How did you solve this issue?
Best Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2022 08:14 PM
Hi Robert,
I eventually ended up creating my custom Flow action to add user to Exchange online shared mailbox. OOTB SN does not have this action on Exchange online spoke.
It depends on your infrastructure setup - if your shared mailboxes are synched from onprem Exchange server - you can do it through the Orchestration Exchange activity.
For EOL spoke - you will need to create a custom action to add user to shared mailbox directly on EOL - You can copy one of the OOTB action (such as Look up Mailbox) > and based on that create add user to mailbox action - You just change the mid server script to run the "Add-MailboxPermission" command - Refer this for cmd - Add-MailboxPermission (ExchangePowerShell) | Microsoft Learn.
Let me know if you get stuck - i can help you on this setup, as i have just recently done it successfully and working fine in our production instances.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2022 02:11 PM
Hi Sam,
I was wondering if you could share more detail on your post?
I setup the EXO spoke and was kind of disappointed in its limitations until reading your post. If I can customize actions based on other actions that might provide some hope.
Can you share more information on what you did? I see the "Lookup up Mailbox" action but I'm not sure how to copy it and begin editing it. Also, I assume you make a copy that you can edit the script name?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 11:52 AM
Kevin,
you may have already discovered this but those are scripts on the MID server, we found that if you looked under "MID Server" >> Script Files" they are listed there and allow you to make changes. Obviously make a copy of the file.