Office 365 API Tools for Visual Studio - Users and Files

Play Office 365 API Tools for Visual Studio - Users and Files

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 ?

  • User profile image

    I am following the exact method described however noticed that as on 29 April 2019 Azure AD profile picture does not replicate to O365 apps (including Delve). We checked with Microsoft Premier Support and they advised below - Photo is replicated throughout the Azure AD only, it is not replicated into Exchange online or any other application. Can you please advise how to sync to all Office365 applications through C# code?

Add Your 2 Cents