cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Re: Item Id doesn't belong to the current mailbox

Also having the same issue in our organisation. Not ideal for our production Flows...

Highlighted
New Member

Same here...

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!

Highlighted
Regular Visitor

Re: Same here...

Ensure you open a support ticket if you have the ability.

Highlighted
Frequent Visitor

Re: Item Id doesn't belong to the current mailbox

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.  

Highlighted
Helper II
Helper II

Re: Item Id doesn't belong to the current mailbox

Then why in the world is their a trigger for Shared Mailbox? If it's not supported, don't give the option. 

 

EDIT: 

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? 

Highlighted
Helper II
Helper II

Re: Item Id doesn't belong to the current mailbox

Highlighted
Frequent Visitor

Re: Item Id doesn't belong to the current mailbox

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.

Highlighted
Helper II
Helper II

Re: Item Id doesn't belong to the current mailbox

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. 

Highlighted
Frequent Visitor

Re: Item Id doesn't belong to the current mailbox

Hey guys,

 

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.

Highlighted
Frequent Visitor

Re: Item Id doesn't belong to the current 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:

 

0.png

 

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:

 

1.png

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:

 

2.png

 

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.

View solution in original post

Highlighted
Frequent Visitor

Simple solution that helped for me

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.

15.png

 

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.

Highlighted
Frequent Visitor

Re: Item Id doesn't belong to the current mailbox

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.

Highlighted
Helper II
Helper II

Re: Simple solution that helped for me

My hero, @Mindaugas!

Highlighted
New Member

Re: Simple solution that helped for me

@Mindaugas , this solution worked for me. 

 

Thx a lot.

Highlighted
Advocate II
Advocate II

Re: Simple solution that helped for me

In logic Apps - Get Atachments stlill in error - adding connection did not help for me

Highlighted
Helper II
Helper II

Re: Simple solution that helped for me

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"?

Thank you!

Highlighted
Helper II
Helper II

Re: Simple solution that helped for me

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. 

Highlighted
Helper II
Helper II

Re: Simple solution that helped for me

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: 

1.png

In this way, I ran from adding new user in Admin Center and creating new connections (connection with shared mailbox) in Flow.


Highlighted
Regular Visitor

Re: Item Id doesn't belong to the current mailbox

Here's the generic setup to get all attachments once you trigger the email:

Untitled 3.png

 

Where the Function for the URL is:

concat('/v1.0/users/SHAREDEMAIL@DOMAIN.EXT/messages/',triggerBody()?['id'],'/attachments/',items('For_each')?['id'],'/$value')

 

Highlighted
Helper II
Helper II

Re: Item Id doesn't belong to the current mailbox

I see @rhalabicki, but your solution it's applicable only for Premium Accounts, not for the ones with Standard Plan.

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (6,229)