Want to save
not required
Microsoft 365
Azure Data Factory
Office Development
-
Harishga 5,990 Reputation points • Microsoft Vendor
2024-05-14T15:44:56.99+00:00 Welcome to Microsoft Q&A platform and thanks for posting your question here.
To save email attachments from an Outlook 365 shared mailbox to Azure Blob storage using Azure Data Factory (ADF), follow these steps:
- First, create a Linked Service in ADF for Office 365. Use the mailbox address [abc@abe.com] and ensure that you have the necessary permissions, such as Mail Read, for the service principal.
- Next, create a Dataset for Office 365 in ADF using the BasicDataSet_v0.Message_v0 dataset type and configure it with the shared mailbox details and filter criteria for the emails that have attachments.
- After that, create a Pipeline in ADF and add a Copy activity, setting the Office 365 dataset as the source and Azure Blob Storage as the sink.
- Finally, configure the Copy Activity to handle the JSON output from the Office 365 dataset, which includes the email attachments. You need to parse the JSON and extract the attachments using a Data Flow or additional activities.
Reference:
https://learn.microsoft.com/en-us/azure/data-factory/load-office-365-dataI hope this information helps you. Let me know if you have any further questions or concerns.
-
Gorakh Nath Sharma 0 Reputation points
2024-05-15T05:19:52.3833333+00:00 Hi Harishga,
Thanks for your guidence but where is the option to specify mailbox address in linked service and how to grant read permission to SP id?
-
Harishga 5,990 Reputation points • Microsoft Vendor
2024-05-15T06:37:56.8866667+00:00 To create a Linked Service in Azure Data Factory for Office 365 using the mailbox address “abc@abe.com”, you’ll need to follow these steps:
- Navigate to the Manage tab in your Azure Data Factory or Synapse workspace.
- Select Linked Services, then click New.
- Search for Microsoft 365 (Office 365) and select the Microsoft 365 (Office 365) connector.
- In the New Linked Service window, provide the necessary details including the service principal ID and service principal key. For the mailbox address, you will typically enter this information in the connection settings where you specify the dataset details.
As for granting Mail Read permission to a service principal, you would:
- Go to your Office 365 account in the Azure portal and select "Azure Active Directory".
- Select "App registrations" and choose the Service Principal ID you want to grant permissions to.
- Select "API permissions" and then "Add a permission".
- Choose "Microsoft Graph" as the API and select "Application permissions".
- Select the "Mail.Read" permission and then "Add permissions".
- Grant admin consent for the permission.
Reference:
https://learn.microsoft.com/en-us/azure/data-factory/load-office-365-datahttps://learn.microsoft.com/en-us/graph/api/serviceprincipal-get?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/permissions-reference
I hope this information helps you. Let me know if you have any further questions or concerns.
-
Harishga 5,990 Reputation points • Microsoft Vendor
2024-05-16T05:12:20.74+00:00 @Gorakh Nath Sharma
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution, please do share that same with the community as it can be helpful to others. Otherwise, will respond with more details and we will try to help. -
Gorakh Nath Sharma 0 Reputation points
2024-05-16T09:26:33.07+00:00 Hi Harishga,
as per your comment earlier you state that in dataset i can use mailbox name but there is no option to mention that please check the below image:I am still not able to specify mailbox address from where i need to fetch data.
-
Harishga 5,990 Reputation points • Microsoft Vendor
2024-05-16T10:56:24.1133333+00:00 @Gorakh Nath Sharma
Can you please follow this link:
https://www.youtube.com/watch?v=8WIcnof-CL8
I hope this information helps you. Let me know if you have any further questions or concerns. -
Gorakh Nath Sharma 0 Reputation points
2024-05-21T06:20:24.0033333+00:00 I have already checked this video but no where its showing where to use mailbox ID .
Sign in to comment