Get Attachment photo/video/file from conversation by attachment id or contentUrl

Aleksandr Yushko 1 Reputation point

Hi All! Need Help!
We tried to receive attachment file when send conversation to other side but can't do it.
attempt 1(with graph client):"1614078832901").attachments("b7c5fd22-8b53-4528-8fe3-5d600471eeb8").buildRequest().get();
response status: 403.

attempt 2 (with Postman):
Authorization Bearer {token}
response status: 403.

attempt 3 (with contentUrl): Documents/General/a3411_lg.jpg
Authorization Bearer {token}
response status: 401.

All permissions was added from this doc:

I read that your SDK did not support this functionality earlier. Is it possible now to get the attached file somehow? If not, when do you plan to implement this feature?

Thanks a lot!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,059 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Mamatha-MSFT 156 Reputation points

    Hi @Aleksandr Yushko , I tried to repro at my end using Graph API request it's working fine and I am getting attachment properties.


    Could you please try again by giving correct Message Id and attachment Id.

    0 comments No comments

  2. Aleksandr Yushko 1 Reputation point


    Hi, @Mamatha-MSFT .
    Are you tried to get attachments from Microsoft Teams?
    If yes, can you describe steps for getting attachment files and needed permissions?
    This API doesn't work for me: