Office 365 API Tools for Visual Studio - Users and Files

Sign in to queue

The Discussion

  • User profile image


    I got this error and I do not know how to solve it :(

    It throws a exception at executing this code:
    var filesResults = await _client.Files.ExecuteAsync();
    return filesResults.CurrentPage;

    "{\"error\":\"invalid_client\",\"error_description\":\"Invalid audience Uri 'Microsoft.SharePoint'.\"}"

    When I signOut and log in again, I can execute this code again.

    Could you explain me how I have to fix this?

  • User profile image

    @Castro: Can you explain what is your scenario and how are you creating the auth context for Files client? 


  • User profile image
    Philipp Leser

    Hi Mr. Chandran,
    thanks for the video, your blog and your good work on the Office365 API.

    I am playing around with the API for fun. I own Office365 for the private user, but also generated a test account with Office365 for small bussinesses.

    At the moment I think about a problem: let's assume I want to use the Office365 API to write/archive a huge file from a folder from my local hard drive (my pc) to Office3z65 OneDrive. I get this done for files up to 4GB using a buffered stream and Microsoft.Office365.SharePoint.SharePointClient.AddAsync(pathName, true, stream).

    But what about large file sizes? I thought about loading in up in chuncks, but I do not see how to do this using AddAsync (there is no Appending r Update for files? Right?). Is there a more proper way to use the 365 API for that problem?

    Thanks and regards

  • User profile image

    may I request you to share the demo code, please ?

Add Your 2 Cents