microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Graph SDK Upload Large File to OneDrive for MSA Account — Unauthenticated After Getting Upload Session

Open
#2,949 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug: documentation
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Hi, I'm using the Microsoft Graph SDK (version 5.61.0) to upload a large file to OneDrive via an upload session for MSA Accounts (Enterprise Accounts work fine with the same method). However, after successfully creating the upload session, I keep getting a "{"error":{"code":"unauthenticated","message":"Unauthenticated"}}" error when attempting to upload the file using the SDK.

To verify that the token is valid, I tried uploading the same file using HttpClient with the same token, and it worked as expected.

So it seems the token is valid, but something may be wrong with how the SDK handles the upload.

Has anyone encountered a similar issue, or is there something I might be missing when using the Graph SDK for this scenario?

Thanks in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the OneDrive upload-session flow with Microsoft Graph SDK 5.61.0 for an MSA account, then compare its upload request with the working HttpClient request using the same token. Done means identifying the SDK/request difference and covering the MSA scenario with a verified regression test or a documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.