Skip to main content

Turning On MFA or Security Defaults Stops Amazon Kendra's SharePoint Online Sync

High severityAmazon Web Services About 20 minutes to fix

Overview

Security Defaults or an MFA policy reached the account Kendra crawls SharePoint Online with, and syncs stopped. Move the connector to certificate-based app-only auth.

At a glance

Symptom
Amazon Kendra stops syncing SharePoint Online the day the account it crawls with has to use multifactor authentication.
Likely cause
The data source authenticates as a user, and that user can no longer sign in without a second factor that Kendra can't provide.
Impact
The index keeps serving whatever it held at the last successful sync.
Verification signal
The fix has worked when a sync started after the change reaches SUCCEEDED.
Safe correction
Move the data source to Azure AD App-Only authentication on the same data source ID, keeping a copy of the current configuration and secret version to go back…
Rollback or recovery
Rollback restores the saved data source configuration and the previous secret version; neither step deletes anything.

Symptom

Amazon Kendra stops syncing SharePoint Online the day the account it crawls with has to use multifactor authentication. The change is usually a good one: someone turns on Security Defaults in Microsoft Entra ID, or adds the account to a Conditional Access policy that requires MFA. From then on the SharePoint data source’s sync jobs stop reaching SUCCEEDED, and search results stop reflecting new, changed or removed documents. It happens because the connector’s Basic and OAuth 2.0 authentication types sign in as a user with a stored user name and password, and Kendra’s own prerequisites tell you to deactivate Security Defaults and MFA so it isn’t blocked. The fix is not to turn MFA off again. Move the data source to Azure AD App-Only authentication (OAuth2Certificate), which uses an app registration with a certificate and no user, then leave MFA on.

Why the MFA change looks safe

The account looks like any other user in Entra ID, so it lands in the same rollout. Nobody signs in with it interactively, its password hasn’t changed, and the Kendra index still answers queries, so the break goes unnoticed until someone asks why a new policy document never shows up in search.

Root cause

The data source authenticates as a user, and that user can no longer sign in without a second factor that Kendra can’t provide. The SharePoint connector V2.0 page lists the secret each authentication type needs: Basic needs userName and password, and OAuth 2.0 needs clientId, clientSecret, userName and password. The same page’s SharePoint Online prerequisites include deactivating Security Defaults and deactivating MFA on the SharePoint account, so that Kendra is not blocked from crawling.

Microsoft’s documentation explains the other side. The resource owner password credentials (ROPC) flow, where an app sends a user’s name and password, is incompatible with MFA, and users who need MFA to sign in to the application are blocked. Security Defaults require every user to register for MFA and block legacy authentication protocols. MFA doesn’t apply to service principals, which is why app-only authentication keeps working.

Impact

The index keeps serving whatever it held at the last successful sync. New and edited documents don’t appear, and documents removed from SharePoint stay searchable until a sync succeeds, which matters when a file was taken down because it shouldn’t be found. Kendra is no longer open to new customers, so this lands on teams running an existing index, often one nobody has looked at for a while.

Shortcuts that make it worse

  • Turning Security Defaults back off. That removes the MFA registration requirement and the legacy authentication block for every user in the tenant, not just this one. Microsoft’s guidance is that organisations that disable Security Defaults should immediately put Conditional Access policies in place instead.
  • Excluding the account from the MFA policy. The connector prerequisites ask for an account with site admin permissions, so this leaves a password-only account that can read every site it administers.

How to confirm it before changing anything

These commands only read. Find the data source, then read its authentication type and secret:

aws kendra list-data-sources --index-id IDX-EXAMPLE \
  --query "SummaryItems[].[Id,Name,Type,Status]"

aws kendra describe-data-source --id DS-EXAMPLE --index-id IDX-EXAMPLE \
  --query "Configuration.TemplateConfiguration.Template.[connectionConfiguration.repositoryEndpointMetadata.repositoryAdditionalProperties.authType,secretArn]"

An authType of Basic or OAuth2 means the connector signs in as a user. Then check the sync history and read the error rather than guessing at it:

aws kendra list-data-source-sync-jobs --id DS-EXAMPLE --index-id IDX-EXAMPLE \
  --query "History[].[ExecutionId,StartTime,Status,ErrorMessage]"

Look for the first run that didn’t reach SUCCEEDED and compare its start time with the date of the Security Defaults or Conditional Access change. In Entra ID, check whether the account named in the secret is in scope of an MFA policy. Don’t read the secret value to find the user name; ask the owner or check the change record.

Correction

Move the data source to Azure AD App-Only authentication on the same data source ID, keeping a copy of the current configuration and secret version to go back to.

  1. Back up: aws kendra describe-data-source --id DS-EXAMPLE --index-id IDX-EXAMPLE --output json > kendra-ds-before.json, and record the secret’s current version with aws secretsmanager describe-secret --secret-id <secret ARN> --query VersionIdsToStages.
  2. In Entra ID, register an app for this connector and upload a self-signed X.509 certificate under Certificates & secrets (.cer, .pem or .crt). Give it the SharePoint application permission Sites.Read.All, or Sites.FullControl.All if the data source crawls ACLs. To crawl only some sites, use Sites.Selected and grant each site explicitly through Microsoft Graph.
  3. Put the certificate file in a private S3 bucket that the data source’s IAM role can read. Precondition: the role already has access to the secret and, if it uses a customer managed key, to that key.
  4. Write {"clientId":"…","privateKey":"…"} to a file only you can read and store it as a new secret version: aws secretsmanager put-secret-value --secret-id <secret ARN> --secret-string file://kendra-sp-app.json. Delete the local file afterwards. The old user credentials move to AWSPREVIOUS.
  5. Copy the Configuration object from kendra-ds-before.json to kendra-ds-config.json. Change authType to OAuth2Certificate, add s3bucketName and s3certificateName beside it, make sure tenantId is set, and leave everything else as it was. Apply it: aws kendra update-data-source --id DS-EXAMPLE --index-id IDX-EXAMPLE --configuration file://kendra-ds-config.json.
  6. Start one sync: aws kendra start-data-source-sync-job --id DS-EXAMPLE --index-id IDX-EXAMPLE. If a sync is already running, Kendra returns ResourceInUseException; wait for it to finish.

Stop if the update is refused or the sync fails with an authentication error. Nothing has been deleted, the index still serves its existing content, and the backups restore the previous state. Keep MFA on for the old account throughout.

Validation

The fix has worked when a sync started after the change reaches SUCCEEDED. Run list-data-source-sync-jobs again and expect SUCCEEDED with no ErrorMessage; a large site can take an hour or more. Run the describe-data-source query and expect OAuth2Certificate. Then change a test document in a crawled site, sync, and search for the change. Finally, confirm the old account is still covered by MFA: the connector no longer depends on it.

Rollback

Rollback restores the saved data source configuration and the previous secret version; neither step deletes anything. Apply the original configuration with aws kendra update-data-source --id DS-EXAMPLE --index-id IDX-EXAMPLE --configuration file://kendra-ds-rollback.json, built from the Configuration object in kendra-ds-before.json. Move the secret back with aws secretsmanager update-secret-version-stage --secret-id <secret ARN> --version-stage AWSCURRENT --move-to-version-id <previous version ID> --remove-from-version-id <new version ID>. Rolling back puts user authentication back, which still fails while MFA applies to that account, so use it only if the new configuration causes a different problem. Don’t turn MFA off to make the rollback work.

Stop it happening on the next connector

Before any MFA or Security Defaults rollout, list every Kendra data source whose authType is Basic or OAuth2 and move it first; the same check applies to other connectors that store a user’s password. Keep connector credentials in Secrets Manager with one secret per data source, as AWS recommends, and record the certificate’s expiry next to other certificate renewals. Keep the certificate bucket private and encrypted: account-level Block Public Access only protects it while it stays on, and default bucket encryption only covers objects uploaded after it was set, so put the certificate in after both are in place.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Fix commands and configuration

SUCCEEDED
OAuth2Certificate
userName
4

When to escalate

Validation and rollback are covered in the sections above.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

Discover more

Connected KBY resources