Microsoft.Graph.Core 1.11.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.Graph.Core --version 1.11.0
NuGet\Install-Package Microsoft.Graph.Core -Version 1.11.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Graph.Core" Version="1.11.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Graph.Core --version 1.11.0
#r "nuget: Microsoft.Graph.Core, 1.11.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.Graph.Core as a Cake Addin
#addin nuget:?package=Microsoft.Graph.Core&version=1.11.0

// Install Microsoft.Graph.Core as a Cake Tool
#tool nuget:?package=Microsoft.Graph.Core&version=1.11.0

Microsoft Graph .NET Client Library

Build status NuGet Version

Integrate the Microsoft Graph API into your .NET project!

The Microsoft Graph .NET Client Library targets .NetStandard 1.1 and .Net Framework 4.5.

Installation via NuGet

To install the client library via NuGet:

  • Search for Microsoft.Graph in the NuGet Library, or
  • Type Install-Package Microsoft.Graph into the Package Manager Console.

Getting started

1. Register your application

Register your application to use Microsoft Graph API using one of the following supported authentication portals:

2. Authenticate for the Microsoft Graph service

The Microsoft Graph .NET Client Library does not include any default authentication implementations. Instead, the user will want to authenticate with the library of their choice, or against the OAuth endpoint directly, and built-in DelegateAuthenticationProvider class to authenticate each request. For more information on DelegateAuthenticationProvider, see the library overview

The recommended library for authenticating against AAD is ADAL.

For an example of authenticating a UWP app using the V2 Authentication Endpoint, see the Microsoft Graph UWP Connect Library.

3. Create a Microsoft Graph client object with an authentication provider

An instance of the GraphServiceClient class handles building requests, sending them to Microsoft Graph API, and processing the responses. To create a new instance of this class, you need to provide an instance of IAuthenticationProvider which can authenticate requests to Microsoft Graph.

For more information on initializing a client instance, see the library overview

4. Make requests to the graph

Once you have completed authentication and have a GraphServiceClient, you can begin to make calls to the service. The requests in the SDK follow the format of the Microsoft Graph API's RESTful syntax.

For example, to retrieve a user's default drive:

var drive = await graphClient.Me.Drive.Request().GetAsync();

GetAsync will return a Drive object on success and throw a ServiceException on error.

To get the current user's root folder of their default drive:

var rootItem = await graphClient.Me.Drive.Root.Request().GetAsync();

GetAsync will return a DriveItem object on success and throw a ServiceException on error.

For a general overview of how the SDK is designed, see overview.

The following sample applications are also available:

Documentation and resources

Notes

Install NewtonSoft.Json first if you want to use a version greater than NewtonSoft.Json 6.0.1. For example, you'll need to install NewtonSoft.Json 9.0.1 first if you want to use this to library while targeting .Net Core with standard1.0.

Install System.Runtime.InteropServices.RuntimeInformation before you install Microsoft.Graph >=1.3 if you are having an issue updating the package for a Xamarin solution. You may need to updated references to Microsoft.NETCore.UniversalWindowsPlatform to >=5.2.2 as well.

Issues

To view or log issues, see issues.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Other resources

Building library locally

If you are looking to build the library locally for the purposes of contributing code or running tests, you will need to:

  • Have the .NET Core SDK (> 1.0) installed
  • Run dotnet restore from the command line in your package directory
  • Run nuget restore and msbuild from CLI or run Build from Visual Studio to restore Nuget packages and build the project

License

Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT license. See Third Party Notices for information on the packages referenced via NuGet.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.1 is compatible.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (35)

Showing the top 5 NuGet packages that depend on Microsoft.Graph.Core:

Package Downloads
Microsoft.Graph The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Microsoft Graph Client Library allows you to call Office 365, Azure AD and other Microsoft services through a single unified developer experience.

Microsoft.Graph.Auth The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Microsoft Graph Authentication Library implements authentication functionality used by Microsoft Graph Client Library. It provides a set of OAuth scenario-centric providers that implement Microsoft.Graph.IAuthenticationProvider and uses Microsoft Authentication Library (MSAL) to handle access token acquisition and storage.

Microsoft.Graph.Beta The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Microsoft Graph beta client library allows you to target the Microsoft Graph /beta endpoint. You can call Office 365, Azure AD and other Microsoft services through a single unified developer experience.

PnP.Framework

PnP Framework contains the PnP Provisioning engine and a ton of extension methods that will make you more productive while developing for Microsoft 365.

Microsoft.Graph.Communications.Core The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Microsoft Graph Communications Client Core Library - This library builds on the Microsoft.Graph SDK to provide better support for the Communications APIs.

GitHub repositories (22)

Showing the top 5 popular GitHub repositories that depend on Microsoft.Graph.Core:

Repository Stars
ONLYOFFICE/CommunityServer
Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator.
pnp/PnP
SharePoint / Office 365 Developer Patterns and Practices - Archived older solutions. Please see https://aka.ms/m365pnp for updated guidance
pnp/PnP-PowerShell
SharePoint PnP PowerShell CmdLets
Kyrodan/KeeAnywhere
A cloud storage provider plugin for KeePass Password Safe
microsoftgraph/msgraph-sdk-powershell
Powershell SDK for Microsoft Graph
Version Downloads Last updated
3.1.8 53,819 2/16/2024
3.1.8-preview.1 43 2/27/2024
3.1.7 55,564 2/9/2024
3.1.6 254,019 1/23/2024
3.1.5 116,678 1/15/2024
3.1.4 12,905 1/9/2024
3.1.3 433,231 11/29/2023
3.1.2 511,127 11/15/2023
3.1.1 133,999 11/7/2023
3.1.0 258,582 10/24/2023
3.0.11 831,667 9/5/2023
3.0.11-preview.1 170 9/1/2023
3.0.10 592,635 8/8/2023
3.0.10-preview.1 553 7/13/2023
3.0.9 803,508 6/29/2023
3.0.9-preview.1 151 6/29/2023
3.0.8 7,208 6/27/2023
3.0.7 507,759 5/30/2023
3.0.6 1,055,410 4/18/2023
3.0.6-preview.1 145 4/18/2023
3.0.5 481,253 3/30/2023
3.0.4 137,755 3/27/2023
3.0.3 163,507 3/21/2023
3.0.2 145,160 3/13/2023
3.0.1 113,191 3/7/2023
3.0.0 134,796 2/28/2023
3.0.0-rc.6 7,426 2/9/2023
3.0.0-rc.5 4,180 1/26/2023
3.0.0-rc.4 221 1/25/2023
3.0.0-rc.3 2,657 1/18/2023
3.0.0-rc.2 1,726 1/11/2023
3.0.0-rc.1 9,652 12/16/2022
3.0.0-preview.19 232 12/14/2022
3.0.0-preview.18 347 12/6/2022
3.0.0-preview.17 100,548 11/23/2022
3.0.0-preview.16 106,272 10/18/2022
3.0.0-preview.15 397 10/3/2022
3.0.0-preview.14 4,986 9/28/2022
3.0.0-preview.13 2,301 9/6/2022
3.0.0-preview.12 402 8/29/2022
3.0.0-preview.11 68,112 7/20/2022
3.0.0-preview.10 2,265 7/13/2022
3.0.0-preview.9 21,308 6/21/2022
3.0.0-preview.8 1,950 6/9/2022
3.0.0-preview.7 1,491 5/31/2022
3.0.0-preview.6 5,727 5/20/2022
3.0.0-preview.5 11,168 5/4/2022
3.0.0-preview.4 3,829 4/13/2022
3.0.0-preview.3 312 4/12/2022
3.0.0-preview.2 1,107 4/1/2022
3.0.0-preview.1 2,092 3/22/2022
2.0.15 2,264,243 2/9/2023
2.0.14 6,606,353 10/11/2022
2.0.13 753,784 9/27/2022
2.0.13-preview.1 192 9/26/2022
2.0.12 2,562,309 8/24/2022
2.0.11 690,971 8/11/2022
2.0.10 756,001 7/20/2022
2.0.9 4,019,190 6/9/2022
2.0.8 4,721,637 2/18/2022
2.0.7 3,378,886 12/16/2021
2.0.6 282,818 12/2/2021
2.0.5 5,798,235 9/1/2021
2.0.4 47,478 8/24/2021
2.0.3 337,654 8/17/2021
2.0.2 479,159 8/11/2021
2.0.1 152,564 8/5/2021
2.0.0 479,801 7/22/2021
2.0.0-preview.14 2,385 7/7/2021
2.0.0-preview.13 41,033 6/18/2021
2.0.0-preview.12 38,056 6/7/2021
2.0.0-preview.11 58,034 5/7/2021
2.0.0-preview.10 36,966 4/21/2021
2.0.0-preview.9 23,257 4/1/2021
2.0.0-preview.8 37,834 3/17/2021
2.0.0-preview.7 551 3/2/2021
2.0.0-preview.6 410 2/24/2021
2.0.0-preview.5 293 2/24/2021
2.0.0-preview.4 5,083 1/6/2021
2.0.0-preview.3 26,988 4/29/2020
2.0.0-preview.2 2,350 4/9/2020
2.0.0-preview.1 15,826 3/9/2020
1.25.1 9,363,353 3/25/2021
1.25.1-preview.2 275 3/25/2021
1.25.1-preview.1 297 3/25/2021
1.25.0 248,823 3/25/2021
1.25.0-preview.2 311 3/20/2021
1.25.0-preview.1 515 3/17/2021
1.24.0 3,097,746 1/19/2021
1.24.0-preview.1 313 1/14/2021
1.23.0 2,710,630 11/26/2020
1.22.0 3,219,253 10/7/2020
1.22.0-preview.2 398 10/6/2020
1.22.0-preview.1 398 7/28/2020
1.21.0 2,422,201 7/28/2020
1.21.0-preview.1 3,043 6/19/2020
1.20.1 5,056,093 3/31/2020
1.20.0 6,623,966 2/5/2020
1.19.0 2,699,214 12/11/2019
1.18.0 1,322,632 10/10/2019
1.17.0 891,314 8/15/2019
1.16.0 121,184 7/3/2019
1.15.0 2,091,855 5/1/2019
1.14.1 146,104 3/29/2019
1.14.0 1,219,622 3/25/2019
1.12.0 1,319,681 10/31/2018
1.11.0 310,480 9/19/2018
1.10.0 407,885 7/6/2018
1.9.0 1,415,830 5/3/2018
1.8.1 216,469 3/23/2018
1.7.0 193,997 12/14/2017
1.6.2 167,310 9/26/2017
1.6.1 79,511 8/24/2017
1.6.0 47,442 8/8/2017
1.5.0 252,906 6/12/2017
1.4.0 289,504 5/10/2017
1.3.1 63,353 4/3/2017
1.3.0 206,722 11/8/2016
1.2.1 142,076 9/27/2016
1.1.1 11,624 8/8/2016
1.1.0 4,101 8/6/2016

September 2018 Release Summary (version 1.11.0)

- exposed the HttpProvider constructor