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 III
Super User III

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 blogPower 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. 

abm
Super User III
Super User III

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 blogPower 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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (15,217)