Yesterday the flow just seemed to break, giving the "Item Id doesn't belong to the current mailbox" error. I've deleted the connections, recreated a whole new flow, and still nothing. This is essential to our customer service team's productivity, so this is really killing us right now!
I opened a ticket with MS and after they did some research here is their response:
"using actions like “Get Email” and “Delete Email” in Shared Mailboxes is currently not supported, per the documentation for this connector: https://docs.microsoft.com/en-us/connectors/office365/#shared-mailbox-support. Only triggers and actions with Shared Mailbox in the name are supported.
This has been documented for some time but was working. It seems last week a change [with Outlook and Exchange] was finally made that broke this functionality. As mentioned in that documentation, the suggested workaround is to use the “HTTP with Azure AD” connector and the Graph API to work with items in Shared Mailboxes."
I've not had time to look into the linked document.
Then why in the world is their a trigger for Shared Mailbox? If it's not supported, don't give the option.
So we can trigger on a shared mailbox, but just email based on the trigger? Isn't that the only action with Shared Mailbox in the name? So we can't do anything with the email?
Even better... MS' own employees use the function.
Pretty much. The details about the email are available from that original trigger. But actions are no longer available via the Flow Actions. Instead, you will need to use the HTTP Service call and create the command to perform the actions that are still available. At least that is what the say in a generic response. The information in that link provides limited guidance.
At least the documentation says something like "the other operations do not support shared mailboxes as of yet." so they may be re-adding the actions via simple flow actions.
I think I could get over it, if I could just get a kick in my butt with how to get the HTTP with Azure AD action setup. I've done API work with JSON in Flow before. From some light research, I probably should've done it this way to begin with but man the other way was so much easier. If it wasn't supposed to work and it did and now they've broken it, it makes it all the more maddening.
I started having this problem myself and seem to have fixed it.
What I noticed was that the connection had changed on the delete email action from the shared mailbox connection to my own mailbox connection.
So, check that the connection you are using for both Get Email and Delete Email are the same, normally for the shared mailbox.
I found a "solution". Which is actually just doing what Microsoft is advising us to do: Use the Graph API.
First step is to use the HTTP with Azure AD connector: Invoke an HTTP request:
Then you have to create a new connection. In the documentation, Microsoft specifies that we must use "https://graph.microsoft.com/" as both the Base Resource URL and the Azure Resource URI:
Then simply click on "Sign In", and use your personal credentials.
Now you can simply refer to the Outlook REST API documentation (or the rest of Microsoft Graph).
Example on how to flag an e-mail:
Remember to change the shared mailbox in the URL: ENTERSHAREDMAILBOX@HERE.COM should of course be replaced with the shared mailbox that you are working with.
Hey Guys got this problem from Wednesday too. I have a flow witch reads mail in sharedmailbox, saves attachmetns to sharepoint and marks email as read.
1. First you have to know password of sharedmailbox IF Not go admin center -> active user -> find shared mailbox and get password.
2. Go to your MS flow that keeps failing. Then Edit.
3. Find action that is failing in my case it was "Mark as read or unread V2"
4. Then push 3 dots. And there is +Add new connection select it.
5. Enter sharedmailbox adress and password.
6. Checked if it appeared among other conections. As in step 4 if not try again. ( Few times needed for me.)
Wordked for me.
Okay, so that actually means that we need Premium to get this to work with Graph API? This is just great...
Is there any proper answer from MS, if all actions cannot be used with sharedmailbox or specific ones? Apparently Move Email still works for me, but other dont.
The same for me: I still have error at "Get Attachments" action in Flow.
I even can't create new connection with the shared mailbox address...
@Mindaugas, could you be more explicit on "how to add new connection with shared mailbox"?
The way I added the connection was through the left pane, Data > Connections > New Connection > Search Outlook > choose the Office 365 one > Create > enter credentials
From the Flow: click the three dots on your action and select the newly created Connection.
Thank you, @jonathanford!
But it doesn't worked for me, due to the fact I don't have permission to admin center settings.
I have solved the issue in other way:
1. I have created a rule for the specific shared mailbox to redirect all arrived emails to my personal mailbox;
2. I have created a second rule to move all emails arrived from the specific shared mailbox to my personal mailbox to move to a specific folder inside Inbox;
3. I have changed the trigger in Flow:
In this way, I ran from adding new user in Admin Center and creating new connections (connection with shared mailbox) in Flow.
Here's the generic setup to get all attachments once you trigger the email:
Where the Function for the URL is:
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!