Version: eXtendFiles 1.8.9 and above

Audience: NetSuite Administrator, Microsoft 365 Administrator

Problem

Authentication errors with Microsoft OneDrive/SharePoint can occur in two different situations:

  • During initial authentication, when first connecting eXtendFiles to your OneDrive/SharePoint backend storage
  • During file upload, when a connection that was previously working stops accepting uploads

Use the section below that matches where you are seeing the error.

Errors During Initial Authentication

Problem

When authenticating eXtendFiles to your Microsoft OneDrive/SharePoint backend storage, you may encounter one of these error messages:

  • An error occurred while authenticating due to - Unable to find site by name "yoursitename"
  • An error occurred while authenticating due to - The resource could not be found.

Cause

"Unable to find site by name" error can occur due to:

  • The SharePoint site was recently created and isn't yet available in the SharePoint API (takes approximately one hour)
  • You don't have sufficient permissions to access the site
  • The site name doesn't exist or was typed incorrectly
  • The site is not shared properly

"The resource could not be found" error can occur due to:

  • The folder name contains spaces (SharePoint folders used with eXtendFiles should not contain spaces)
  • You don't have permissions to access the specified folder
  • The folder path was typed incorrectly or doesn't exist

Solution

For "Unable to find site by name" errors:

  1. If you recently created the SharePoint site, wait approximately one hour for it to become available in the SharePoint API
  2. Verify that the site name is entered correctly in the SharePoint Site Name field
  3. Confirm you have proper permissions to access the site. When authenticating eXtendFiles to your Microsoft OneDrive/SharePoint backend storage, a Microsoft 365 Global Administrator account should be used
  4. Ensure External Sharing is enabled for your SharePoint site

For "The resource could not be found" errors:

  1. Ensure your folder name does not contain spaces. Use formats like "MyFolder" or "My-Folder" instead of "My Folder"
  2. Verify the folder path is entered correctly in the Directory Path field
  3. Confirm you have proper permissions to access the site. When authenticating eXtendFiles to your Microsoft OneDrive/SharePoint backend storage, a Microsoft 365 Global Administrator account should be used
  4. Confirm you have proper permissions to access the folder
  5. Try creating a new folder with a simple name (without spaces) and use that in your configuration
  6. Verify that External Sharing is properly configured by testing file upload and sharing in your SharePoint folder

For both error types, consult the Microsoft documentation on enabling External Sharing to ensure your SharePoint environment is properly configured.

Errors During File Upload (Expired or Revoked Authorization)

Problem

Your OneDrive/SharePoint connection was previously configured and working, but file uploads now fail. The upload window displays a Record Creation Failed message containing an AADSTS50173 error, followed by an Error Occurred message stating that no files were received:

filename.csv: AADSTS50173: The provided grant has expired due to it being revoked, a fresh auth token is needed. The user might have changed or reset their password. The grant was issued on 'date' and the TokensValidFrom date (before which tokens are not valid) for this user is 'date'. Trace ID: ... Correlation ID: ... Timestamp: ...

No files received. None of the files were uploaded successfully.

Image Placeholder

Cause

This is a Microsoft Entra ID (Azure AD) error, not an eXtendFiles configuration error. The authorization eXtendFiles was granted has been invalidated by Microsoft, so eXtendFiles can no longer obtain a valid token to write files to your storage.

The error text identifies the two key dates:

  • The grant was issued on — when the Microsoft 365 account last authenticated to eXtendFiles
  • TokensValidFrom — the point at which Microsoft invalidated all tokens issued before that time

Any token issued before the TokensValidFrom date is rejected. This is commonly triggered by:

  • The Microsoft 365 account's password being changed or reset
  • An administrator revoking the account's sessions or refresh tokens
  • The account's multi-factor authentication method being reset or re-registered
  • Consent for the eXtendFiles application being removed in Microsoft Entra ID
  • The account being disabled, or losing the Global Administrator role
  • A Conditional Access or tenant security policy change that invalidated existing sessions

Solution

The authorization must be re-established by authenticating again. Your existing eXtendFiles records and previously uploaded files are not affected.

Step 1: Determine which account needs to re-authenticate

Check whether User Based File Upload is enabled on your eXtendFiles Configuration page:

  • Not enabled — eXtendFiles uploads using a single system-level Microsoft 365 account. A Microsoft 365 Global Administrator must re-authenticate. Uploads will be failing for all users.
  • Enabled — each NetSuite user uploads using their own Microsoft 365 account. The user named in the error needs to re-authenticate. If uploads are failing for only one person, this is usually the cause. See Configuring User Based File Upload In OneDrive.

Step 2: Re-authenticate to Microsoft 365

  1. In NetSuite, go to eXtendTech → eXtendFiles → eXtendFiles Configuration
  2. Open the Storage Settings section and confirm Storage Type is set to OneDrive/SharePoint
  3. Confirm the Directory Path and SharePoint Site Name values are unchanged and still correct
  4. Click Click to Authenticate
  5. Sign in with the applicable Microsoft 365 account. For the system-level connection, this must be an account with the Global Administrator role. If you do not see Consent on behalf of your organization, or you see a justification prompt, you are not signed in as a Global Administrator
  6. Click Accept to authorize the permission request

Step 3: Retry the upload

Return to the NetSuite record and upload the file again.

For full authentication steps, see Configure eXtendFiles for Storage with Microsoft OneDrive/SharePoint.

Frequently Asked Questions (FAQs)

Q: Do I need to re-authenticate using the same Microsoft 365 account that was used originally?
A: For the system-level connection, no. Any account with the Global Administrator role can be used. If User Based File Upload is enabled, the individual user named in the error must re-authenticate with their own account.

Q: Will re-authenticating break links to files that are already uploaded?
B: No. Re-authenticating refreshes the connection only. Existing eXtendFiles records and the files in your SharePoint folder are unchanged.

Q: Were any files uploaded before the error appeared?
No. The accompanying message, "No files received. None of the files were uploaded successfully," A: confirms that nothing was written to your storage and no eXtendFiles records were created.

Q: How often does re-authentication need to be done?
A: Under normal conditions the connection is maintained automatically and no action is required. Re-authentication is typically only needed after a password reset, an MFA change, a revoked consent, or an administrator account change.

Q: Can I prevent this from happening again?
A: Use a dedicated Microsoft 365 service account with the Global Administrator role for the eXtendFiles connection, and exclude it from routine password rotation where your security policy allows. Any password reset on the authenticating account will invalidate the connection.