Share via

ACCESS ONEDRIVE

Giorgio Sfiligoi 326 Reputation points
Mar 4, 2025, 10:34 AM

I have an MS account and use OneDrive. I am developing a .NET MAUI (8.0) app that should be able to access a specific folder in my OneDrive and download/upload files in this folder. The only authorization required should be my MS account.

This task seems simple, but in reality I am stuck with a lot of problems.

To begin with, I tested the old OneDriveApiBrowserSample for desktop, and it works fine. Then I tried to migrate this code to MAUI, but VS reports unexpected errors: for instance it does not recognize the class DelegateAuthenticationProvider, which according to the documentation should be available in Microsoft.Graph - in fact, it runs with OneDriveApiBrowserSample.

Then I resumed the old GraphTutorial for Xamarin, that I had successfully tested a few years ago - but VS reports the same kind of errors as above.

Browsing the online documentation only increased my confusion, as I find several articles that are obsolete. What is the state of the art approach for my (not-so-simple) requirement?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,982 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 49,126 Reputation points Microsoft External Staff
    Mar 5, 2025, 2:36 AM

    Hello,

    DelegateAuthenticationProvider is no longer a suitable authentication method as an AuthenticationProvider.

    Please refer to this document to select the appropriate AuthenticationProvider as the authentication method according to the usage scenario.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.