Download file from HTTPS link received in email using Microsoft Graph API

manish verma 421 Reputation points

Hi Team,

We have a requirement to get email links from office 365 email. We need to consume graph API and get URL link so we can download data using Web activity. Can Microsoft expert suggest this will be possible with Graph API.

If yes, what process do we follow to get URL link from email body using Azure Data Factory.



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

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,286 Reputation points Microsoft Employee

    Hi manish verma,

    Thank you for posting query in Microsoft Q&A Platform.

    If I understand correctly, you get some link (URL) in the email body and want to make API call to that link from ADF. Please correct me if my understanding is wrong.

    You need to consider API call to get email body first and then try to take out only link(URL) from email body and then make API call for it again.

    Below is the documentation of graph APIs for email. Kindly explore it.

    Once you get email body from API response, try to fetch only link from it by using some SQL capabilities or expressions in ADF which allow you to play with strings or by writing some azure function. Once you get link from email body, make another API call using web activity.

    Hope this helps. Please let me know if any further queries.

    Please consider hitting Accept Answer button. Accepted answers help community as well