I encountered many errors when trying to integrate SharePoint with S3 using AppFlow, so I will summarize the solutions.

I encountered many errors when trying to integrate SharePoint with S3 using AppFlow, so I will summarize the solutions.

I summarized the errors encountered and how to resolve them when integrating data from Microsoft SharePoint Online to Amazon S3 using Amazon AppFlow. I will also introduce the actual configuration steps and transfer behavior.
2026.08.11

This page has been translated by machine translation. View original

Introduction

Hello everyone, I'm Akaike.

Recently, I had the opportunity to consider a data integration method from Microsoft SharePoint Online to Amazon S3, and through the article below I learned about a service called Amazon AppFlow, so I decided to actually try out the Microsoft SharePoint Online connector.

https://dev.classmethod.jp/articles/amazon-appflow-microsoft-sharepoint-online-source/

I followed the steps in the official documentation, but when I actually got my hands on it, I encountered a series of errors that couldn't be understood from the documentation alone.

https://docs.aws.amazon.com/ja_jp/appflow/latest/userguide/connectors-microsoft-sharepoint-online.html#microsoft-sharepoint-online-prereqs

Hoping this will help others who get stuck in the same places, I've compiled the errors I encountered, how to resolve them, and the results of actually running the flow.

Prerequisites

  • Having a Microsoft 365 tenant with Microsoft SharePoint Online enabled
  • Having an AWS account to use AppFlow
  • Having administrator privileges for app registration in Azure AD

About AppFlow

Amazon AppFlow is a fully managed service that allows you to integrate data from various SaaS applications such as Salesforce and Slack into AWS services without writing code.

https://docs.aws.amazon.com/ja_jp/appflow/latest/userguide/getting-started.html
https://docs.aws.amazon.com/ja_jp/appflow/latest/userguide/app-specific.html

This time, I'll use AppFlow to transfer documents from Microsoft SharePoint Online to Amazon S3.

What I Did Before Creating the Flow

The general flow follows the official documentation.

https://docs.aws.amazon.com/ja_jp/appflow/latest/userguide/connectors-microsoft-sharepoint-online.html#microsoft-sharepoint-online-prereqs

Entra ID App

First, register an app for AppFlow on the Entra ID (formerly Azure AD) side.

スクリーンショット 2026-08-11 1.37.48

Specify the redirect URL listed in the official documentation.
For the region, specify the region where you will create AppFlow.

スクリーンショット 2026-08-11 1.38.55

Add the following permissions specified in the official documentation to the API permissions.

  • offline_access
  • Sites.Read.All
  • User.Read

スクリーンショット 2026-08-11 1.39.23

スクリーンショット 2026-08-11 1.40.56

Make note of the tenant ID and client ID.

スクリーンショット 2026-08-11 1.41.19

Also create a client secret and make note of it.

スクリーンショット 2026-08-11 1.41.35

SharePoint Site

Next, create the SharePoint site that will be the source for transferring data to S3.

スクリーンショット 2026-08-11 1.43.25

Prepare folders and files for transfer to verify the operation.
This time, I created 3 folders named hogehoge-XX.

スクリーンショット 2026-08-11 1.48.21

Place md, png, and txt files in each folder.
These will also be used to verify the filter feature described later.

スクリーンショット 2026-08-11 1.48.33 1

AppFlow

Now that the preparations are complete, let's create the flow on the AppFlow side.

Use any name for the flow name.
Proceed with the default data encryption settings (no customization).

スクリーンショット 2026-08-11 1.50.26

スクリーンショット 2026-08-11 1.50.32

Create a new connection in the flow and enter the Entra ID app information.

スクリーンショット 2026-08-11 1.50.52

  • Custom auth token URL: Tenant ID
  • Custom auth code URL: Tenant ID
  • Client ID: Client secret's Secret ID
  • Client secret: Client secret's value

スクリーンショット 2026-08-11 1.57.26

And from here, the errors began one after another.

Error ①: AADSTS700016

AADSTS700016: Application with identifier 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxa' was not found in the directory 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.

スクリーンショット 2026-08-11 2.27.58

Resolution

The cause was an incorrect specification of the client ID.
The correct approach was to specify the "Client ID (Application ID)", not the "Client secret's Secret ID".

スクリーンショット 2026-08-11 13.28.11

スクリーンショット 2026-08-11 2.31.40

Error ②: AADSTS50011

After fixing the client ID, a different error appeared.

AADSTS50011: The redirect URI 'https://3rdp.oauth.console.api.aws' specified in the request does not match the redirect URIs configured for the application 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

スクリーンショット 2026-08-11 2.39.59

Resolution

The issue was resolved by adding the redirect URI displayed in the error message (https://3rdp.oauth.console.api.aws) as a redirect URI on the Azure side.
It appears that this also needs to be registered in addition to the redirect URI listed in the official documentation (https://region.console.aws.amazon.com/appflow/oauth).

スクリーンショット 2026-08-11 2.41.38

スクリーンショット 2026-08-11 2.41.49

(I haven't investigated the details, but perhaps there was a specification change on the Entra ID (SharePoint) side.)

Error ③: 500 (Internal Server Error)

Although authentication itself was now passing, an error occurred when trying to retrieve the site list.

An error occurred during authentication
Error while communicating to connector: The request failed because the service Source Microsoft SharePoint Online returned the following error: Details: The request failed with status code 500 (Internal Server Error)..

スクリーンショット 2026-08-11 2.45.59

First, I checked whether the SharePoint license was active, but it appeared to be fine.

az rest --method get --uri "https://graph.microsoft.com/v1.0/subscribedSkus"
{
  "servicePlanId": "e95bec33-7c88-4a70-8e19-b10bd9d0c014",
  "servicePlanName": "SHAREPOINTWAC",
  "provisioningStatus": "Success"
},
{
  "servicePlanId": "c7699d2e-19aa-44de-8edf-1736da088ca1",
  "servicePlanName": "SHAREPOINTSTANDARD",
  "provisioningStatus": "Success"
}

Next, I tried directly retrieving the target SharePoint site that wasn't appearing in the AppFlow screen, via a group rather than using search.

az rest --method get --uri "https://graph.microsoft.com/v1.0/groups/{group-id}/sites/root"
{
  "displayName": "hogehoge-site",
  "webUrl": "https://XXXXX.sharepoint.com/sites/hogehoge-site"
}

This succeeded without any issue.

The license was active, the site actually existed and could be retrieved directly. Yet it wasn't appearing in the AppFlow screen.
At this point, I gave up investigating and decided to wait for a while without knowing the cause.

Resolution

After waiting some time, the issue resolved itself.
Specifically, after exhausting myself trying to isolate the cause, I went to sleep and left it alone for about 8 hours, and by then the site had appeared in the list without me doing anything.

At first, only the auto-generated "Communication Site" was visible,

スクリーンショット 2026-08-11 12.11.37

but after some time the site I had created at the beginning also became visible.

スクリーンショット 2026-08-11 12.21.56

On Microsoft Q&A, similar cases received responses to the effect that it can take time for a newly created site to be reflected.
Since I had just created a new tenant and site this time, it may have taken time to propagate. (Since it's an AI-generated response, I'm honestly not sure how well-supported it is, but the symptoms matched.)

Wait for Propagation: Sometimes, newly created sites may take some time to propagate and become visible in Microsoft Graph. If the site was created very recently, you may need to wait a little while before it shows up.

https://learn.microsoft.com/en-us/answers/questions/5636164/new-sharepoint-site-does-not-appear-in-microsoft-g
https://learn.microsoft.com/en-us/answers/questions/371527/server-error-when-listing-sharepoint-sites

Specifying the Source

Now that the site can be selected, let's proceed with the remaining settings.
The source is specified at the folder level, and this time I specified only a particular folder.

スクリーンショット 2026-08-11 12.30.44

Specifying the Destination

Specify Amazon S3 as the destination.
The destination path format appears to be as follows.

  • S3://<bucket-name>/<bucket-prefix>/<flow-name>

スクリーンショット 2026-08-11 12.30.59

Flow Trigger

There are 3 types of triggers, but it appears that the SharePoint Online connector can only use on-demand and scheduled execution.

スクリーンショット 2026-08-11 12.31.10

This time I selected scheduled execution and will try incremental transfer.
Note that the start date and start time needed to be set to a point in the future from when the connector was created.

スクリーンショット 2026-08-11 12.34.21

Data Field Mapping

Specify all fields for the data field mapping.

スクリーンショット 2026-08-11 12.38.58

スクリーンショット 2026-08-11 12.39.29

Filter

Let's also try out the filter feature while we're at it.
I specified md and png with an OR condition on the "File Type" field.

スクリーンショット 2026-08-11 12.40.50

Flow Activation

Once the settings are complete, create the flow,

スクリーンショット 2026-08-11 12.43.01

and finally activate the flow to complete the setup.

スクリーンショット 2026-08-11 12.45.35

Transfer Results

Initial Transfer

On the first run, all files in the specified folder are transferred.

スクリーンショット 2026-08-11 13.01.54

Looking at the S3 side, it appears that the transferred files are stored in a folder named after the execution ID for each flow run.

スクリーンショット 2026-08-11 13.02.12

Checking the actually transferred files, only the md and png files specified in the filter were transferred, and txt files were excluded.
The filter feature is working properly.

スクリーンショット 2026-08-11 13.01.39

When There Are Incremental Changes

Next, I update 01.md in hogehoge-01 and add a new 001.md.

スクリーンショット 2026-08-11 13.04.36

Only the files with differences are properly transferred,

スクリーンショット 2026-08-11 13.12.41

and on the second run, a new folder with a different execution ID from the first run was created, with the files stored underneath it.

スクリーンショット 2026-08-11 13.13.26

Looking at the contents, only the files with differences were transferred.

スクリーンショット 2026-08-11 13.13.39

The folder from the initial transfer remained unchanged.

スクリーンショット 2026-08-11 13.17.16

When There Are No Incremental Changes

After that, when the flow runs with no differences, a record remains in the execution history,

スクリーンショット 2026-08-11 13.30.44

but nothing was actually transferred.

スクリーンショット 2026-08-11 13.31.04

Conclusion

That's all for my trial of data integration from Microsoft SharePoint Online to Amazon S3 using Amazon AppFlow.
I ran into quite a few errors and it took some effort, but I'm satisfied that I was able to confirm that the folder-level transfer source specification, extension-based filtering, and incremental transfer that I wanted to verify all worked without issues.

I hope this serves as a reference for those considering integration from SharePoint Online to S3.

Share this article

AWSのお困り事はクラスメソッドへ