Skip to content
Branch: master
Find file History

Samples about the Microsoft Graph API SDK for .NET


This is a sample solution that illustrates how to use the Microsoft Graph API SDK for .NET. The solution includes:

  • A console application, which uses the new MSAL (Microsoft Authentication Library) preview to authenticate against the new v2 Authentication endpoint
  • An ASP.NET MVC web application, which uses the ADAL (Azure Active Directory Authentication Library) to authenticate against the Azure AD endpoint

This sample is part of the code samples related to the book "Programming Microsoft Office 365" written by Paolo Pialorsi and published by Microsoft Press.

Applies to

  • Microsoft Office 365


Solution Author(s) Twitter
MicrosoftGraph.Office365.DotNetSDK.sln Paolo Pialorsi ( @PaoloPia

Version history

Version Date Comments
1.0 May 12th 2016 Initial release

Setup Instructions

In order to play with this sample, you need to:

  • Sign up for a developer subscription for Office 365 Office Dev Center, if you don't have one
  • Register the web application in Azure AD in order to get a ClientID and a Client Secret
  • Configure the Azure AD application with the following delegated permissions for Microsoft Graph: View users' basic profile, View users' email address
  • Update the web.config file of the web application with proper settings (ClientID, ClientSecret,Domain,TenantID)
  • Register the console application for the v2 Authentication endpoint in the new Application Registration Portal
  • Configure the .config file of the console application with proper settings (MSAL_ClientID)

You can’t perform that action at this time.