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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,233)