[GH-ISSUE #30] Bug report: Sharepoint sync not following redirects #21

Closed
opened 2026-10-18 21:13:32 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @profoundvision on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/open-webui/oikb/issues/30

Description:
I am encountering an issue where the oikb.daemon successfully authenticates and maps the SharePoint folder structure, but fails to actually download the file contents.

The daemon correctly identifies the files and attempts to fetch the content via the /content endpoint, but it is receiving an HTTP 302 Found response from Microsoft Graph. The daemon is not following the redirect to the provided download.aspx URL, resulting in a sync failure for individual files.

Steps to Reproduce:

  1. Setup OpenWebUI with oikb (Docker Compose)
  2. Configure a SharePoint source with a valid Site ID and Library path.
  3. Run the sync process.
  4. The daemon discovers the directories and files successfully.
  5. Upon attempting to download .docx files, the process logs a 302 Found error and marks the file with an ✗.

Observed Logs:

{"ts": "...", "level": "INFO", "logger": "httpx", "msg": "HTTP Request: GET https://graph.microsoft.com/v1.0/drives/[DRIVE_ID]/root:/[FOLDER_PATH]/[FILE_NAME].docx:/content \"HTTP/1.1 302 Found\""}
  ✗ [FOLDER_PATH]/[FILE_NAME].docx: Redirect response '302 Found' for url 'https://graph.microsoft.com/v1.0/drives/[DRIVE_ID]/root:/[FOLDER_PATH]/[FILE_NAME].docx:/content'
Redirect location: 'https://[TENANT].sharepoint.com/sites/[SITE]/_layouts/15/download.aspx?UniqueId=[ID]&Translate=false&tempauth=[TOKEN]&ApiVersion=2.0'

Expected Behavior:
The daemon should follow the redirection provided by the Microsoft Graph API to retrieve the actual file bytes from the temporary pre-authenticated URL.

Actual Behavior:
The daemon treats the 302 response as a failure and skips the file.

Originally created by @profoundvision on GitHub (Jun 5, 2026). Original GitHub issue: https://github.com/open-webui/oikb/issues/30 **Description:** I am encountering an issue where the `oikb.daemon` successfully authenticates and maps the SharePoint folder structure, but fails to actually download the file contents. The daemon correctly identifies the files and attempts to fetch the content via the `/content` endpoint, but it is receiving an `HTTP 302 Found` response from Microsoft Graph. The daemon is not following the redirect to the provided `download.aspx` URL, resulting in a sync failure for individual files. **Steps to Reproduce:** 1. Setup OpenWebUI with oikb (Docker Compose) 2. Configure a SharePoint source with a valid Site ID and Library path. 3. Run the sync process. 4. The daemon discovers the directories and files successfully. 5. Upon attempting to download `.docx` files, the process logs a `302 Found` error and marks the file with an `✗`. **Observed Logs:** ```text {"ts": "...", "level": "INFO", "logger": "httpx", "msg": "HTTP Request: GET https://graph.microsoft.com/v1.0/drives/[DRIVE_ID]/root:/[FOLDER_PATH]/[FILE_NAME].docx:/content \"HTTP/1.1 302 Found\""} ✗ [FOLDER_PATH]/[FILE_NAME].docx: Redirect response '302 Found' for url 'https://graph.microsoft.com/v1.0/drives/[DRIVE_ID]/root:/[FOLDER_PATH]/[FILE_NAME].docx:/content' Redirect location: 'https://[TENANT].sharepoint.com/sites/[SITE]/_layouts/15/download.aspx?UniqueId=[ID]&Translate=false&tempauth=[TOKEN]&ApiVersion=2.0' ``` **Expected Behavior:** The daemon should follow the redirection provided by the Microsoft Graph API to retrieve the actual file bytes from the temporary pre-authenticated URL. **Actual Behavior:** The daemon treats the `302` response as a failure and skips the file.
Author
Owner

@DantesVault commented on GitHub (Jun 8, 2026):

Im experiencing the same issue. @profoundvision is any file format working for you when syncing with SharePoint?

<!-- gh-comment-id:4653466837 --> @DantesVault commented on GitHub (Jun 8, 2026): Im experiencing the same issue. @profoundvision is any file format working for you when syncing with SharePoint?
Author
Owner

@profoundvision commented on GitHub (Jun 9, 2026):

.md, .txt, .pdf are not working as well.

<!-- gh-comment-id:4658516288 --> @profoundvision commented on GitHub (Jun 9, 2026): .md, .txt, .pdf are not working as well.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/oikb#21
No description provided.