cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ksdaniel
New Member

Error when trying to use "Get Attachment (V2)"

I am developing a simple Office Add-In that can trigger a Flow (HTTP Trigger) directly from Outlook. 

The add-in runs in the context of an email (task-pane add-in), and it will send one of the attachment id's to the flow. 

 

The flow will then use this id to get the attachment content, using the "Get Attachment (V2)" activity,  and create a file in SharePoint with some specific metadata. 

 

The problem is that for some attachment id's the "Get Attachment (V2)" activity fails with the error: 

 

 

Resource not found for the segment 'XRRgW8bXQ='.

 

 

This seems to happen only when the attachment id contains a "/" sign. 

 

 

id: "AAMkADE2NzYyYTRlLTEzMTYtNGZiZS04ZjllLTFlZjg1YjdkODBmOQBGAAAAAABufIpEf3bJQYI3lOffQa2IBwCJ+duvzVIfTYjdjsNdyOfLAAAAAAEMAACJ+duvzVIfTYjdjsNdyOfLAAC5zjKzAAABEgAQAHngfEMntulLiAlbhcqadzA="

 

 

will work as expected, but: 

 

 

id: "AAMkADE2NzYyYTRlLTEzMTYtNGZiZS04ZjllLTFlZjg1YjdkODBmOQBGAAAAAABufIpEf3bJQYI3lOffQa2IBwCJ+duvzVIfTYjdjsNdyOfLAAAAAAEMAACJ+duvzVIfTYjdjsNdyOfLAAC5zjKzAAABEgAQADBczT0LaehHh/XRRgW8bXQ="

 

 

will fail with the error above. 

 

Did somebody see this before? Am I missing something? Is there a good workaround?

4 REPLIES 4
abm
Super User
Super User

Hi @ksdaniel 

 

Could you please provide a screenshot of your flow and the error in detail?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

We can reduce this to a very simple flow with manual trigger and the "Get Attachment (V2)" activity. 

 

image.png

 

The error we receive is: 

 

{
  "error": {
    "code": "BadRequest",
    "message": "Resource not found for the segment 'XRRgW8bXQ='.",
    "innerError": {
      "date": "2021-02-17T12:28:26",
      "request-id": "0649fac1-847c-43a3-a5b2-22637974d846",
      "client-request-id": "0649fac1-847c-43a3-a5b2-22637974d846"
    }
  }
}

 

The email id and attachment id can be retrieved via Outlook or Graph API or the "Get email" activity in the flow.

 

Consistently it fails when they have a "/" sign in the id and it works when its not there. 

 

I am not sure what the "/" means, could be a random occurrence of a character or have some technical significance. 

Hi @ksdaniel 

 

Thanks for your reply.

 

What's your filename and content type?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
ksdaniel
New Member

After some research, I found this: office js - Outlook OfficeJS itemID with slashs return error from MS graph - Stack Overflow

 

The answer being: 

The same ID in order to be processed by the Office 365 Unified API would need to be slightly altered by replacing all / (slash) characters with a - (dash). 

 

I would also like to point out that the API "convertToRestId" in the Outlook Add-In API seems to make the incorrect translation, also the documentation here is not correct: user: translateExchangeIds - Microsoft Graph v1.0 | Microsoft Docs

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,745)