Skip to content

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

@ruoruyan

Description

@ruoruyan

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions