Office 365 API Tools for Visual Studio - Users and Files

Play Office 365 API Tools for Visual Studio - Users and Files
Sign in to queue


The Office 365 APIs allow you to easily integrate Office 365 services into your apps in a consistent way. You can access user data like calendars, documents and more using REST APIs and standard OAuth flows from any platform. The Office 365 API Tools for Visual Studio make it super easy for developers to access the services via .NET or JavaScript client libraries. These tools are currently in preview.

I've been meeting up with different team members building these tools and have been watching them progress through this preview period. In this interview I sit down with Chakkardeep Chandran (Chaks), a Program Manager on this project, and we talk about working with Users and Files.

Download the Office 365 API Tools for Visual Studio Preview here

And for more information see: .NET and JavaScript Libraries for Office 365 APIs 

Have questions? Connect with the team on StackOverflow. (Tag your questions with [Office365] & [API]).

-Beth Massi, Visual Studio Community



Download this episode

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