Microsoft.Graph.Core
1.7.0
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Graph.Core --version 1.7.0
NuGet\Install-Package Microsoft.Graph.Core -Version 1.7.0
<PackageReference Include="Microsoft.Graph.Core" Version="1.7.0" />
<PackageVersion Include="Microsoft.Graph.Core" Version="1.7.0" />
<PackageReference Include="Microsoft.Graph.Core" />
paket add Microsoft.Graph.Core --version 1.7.0
#r "nuget: Microsoft.Graph.Core, 1.7.0"
#addin nuget:?package=Microsoft.Graph.Core&version=1.7.0
#tool nuget:?package=Microsoft.Graph.Core&version=1.7.0
Microsoft Graph .NET Client Library
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:
- Microsoft Application Registration Portal: Register a new application that works with Microsoft Account and/or organizational accounts using the unified V2 Authentication Endpoint.
- Microsoft Azure Active Directory: Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.
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:
- Microsoft Graph UWP Connect Sample
- Microsoft Graph UWP Snippets Sample
- Microsoft Graph MeetingBot sample for UWP
- Microsoft Graph Connect Sample for ASP.NET 4.6
- Microsoft Graph Snippets Sample for ASP.NET 4.6
- Microsoft Graph SDK Snippets Library for Xamarin.Forms
- Microsoft Graph Connect Sample for Xamarin Forms
- Microsoft Graph Meeting Manager Sample for Xamarin.Forms
- Microsoft Graph Property Manager Sample for Xamarin Native
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
- NuGet Package: https://www.nuget.org/packages/Microsoft.Graph
License
Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT license
Product | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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. |
-
.NETFramework 4.5
- Newtonsoft.Json (>= 6.0.1 && < 11.0.0)
-
.NETStandard 1.1
- NETStandard.Library (>= 1.6.0)
- Newtonsoft.Json (>= 9.0.1 && < 11.0.0)
NuGet packages (43)
Showing the top 5 NuGet packages that depend on Microsoft.Graph.Core:
Package | Downloads |
---|---|
Microsoft.Graph
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
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
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. |
|
Microsoft.Graph.Communications.Core
Microsoft Graph Communications Client Core Library - This library builds on the Microsoft.Graph SDK to provide better support for the Communications APIs. |
|
Microsoft.Graph.Communications.Common
Microsoft Graph Communications Client Library - Common utilites for transport, logging, telemetry, state machines, argument validation, and OData. |
GitHub repositories (26)
Showing the top 20 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
|
|
OfficeDev/Microsoft-Teams-Samples
Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
|
|
pnp/PnP-PowerShell
SharePoint PnP PowerShell CmdLets
|
|
microsoftgraph/msgraph-sdk-powershell
Powershell SDK for Microsoft Graph
|
|
microsoftgraph/msgraph-sdk-dotnet
Microsoft Graph Client Library for .NET!
|
|
Kyrodan/KeeAnywhere
A cloud storage provider plugin for KeePass Password Safe
|
|
pnp/PnP-Tools
Scripts and tools for Office 365 and SharePoint - More for IT Pro's
|
|
pnp/PnP-Sites-Core
Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
|
|
OfficeDev/microsoft-teams-apps-company-communicator
Company Communicator app template
|
|
viciousviper/DokanCloudFS
A virtual filesystem for various publicly accessible Cloud storage services on the Microsoft Windows platform.
|
|
OneDrive/onedrive-sdk-csharp
OneDrive SDK for C#! https://dev.onedrive.com
|
|
239573049/ChatGpt.Desktop
ChatGpt Dekstop support Android,IOS,Mac,Linux,Win,Web
|
|
shr670377723/CommunityServer-master
|
|
nheiniger/SnaffPoint
A tool for pointesters to find candies in SharePoint
|
|
pnp/pnpframework
PnP Framework is a .NET library targeting Microsoft 365 containing the PnP Provisioning engine and a ton of other useful extensions
|
|
svrooij/WingetIntune
Package any app from Winget to Intune - WinTuner
|
|
Rambalac/ACDDokanNet
Dokan.NET based driver for Amazon Cloud Drive
|
|
GridProtectionAlliance/gsf
Grid Solutions Framework
|
|
pnp/modernization
All modernization tooling and guidance
|
Version | Downloads | Last updated |
---|---|---|
3.2.4 | 2,759,447 | 3/12/2025 |
3.2.3 | 2,004,963 | 1/30/2025 |
3.2.2 | 1,221,792 | 1/10/2025 |
3.2.1 | 3,241,676 | 11/20/2024 |
3.2.0 | 55,853 | 11/8/2024 |
3.1.22 | 3,495,441 | 9/26/2024 |
3.1.21 | 1,073,909 | 9/4/2024 |
3.1.20 | 45,079 | 8/28/2024 |
3.1.19 | 477,948 | 8/26/2024 |
3.1.18 | 2,382 | 8/26/2024 |
3.1.17 | 30,627 | 8/19/2024 |
3.1.16 | 9,373 | 8/15/2024 |
3.1.15 | 44,704 | 8/9/2024 |
3.1.14 | 93,842 | 7/24/2024 |
3.1.13 | 138,137 | 7/3/2024 |
3.1.12 | 6,022,585 | 5/28/2024 |
3.1.11 | 1,893,480 | 4/30/2024 |
3.1.10 | 1,769,704 | 3/28/2024 |
3.1.9 | 753,961 | 3/18/2024 |
3.1.8 | 2,210,957 | 2/16/2024 |
3.1.8-preview.1 | 169 | 2/27/2024 |
3.1.7 | 421,041 | 2/9/2024 |
3.1.6 | 2,469,288 | 1/23/2024 |
3.1.5 | 451,735 | 1/15/2024 |
3.1.4 | 58,678 | 1/9/2024 |
3.1.3 | 1,356,784 | 11/29/2023 |
3.1.2 | 1,519,226 | 11/15/2023 |
3.1.1 | 264,885 | 11/7/2023 |
3.1.0 | 416,166 | 10/24/2023 |
3.0.11 | 1,366,928 | 9/5/2023 |
3.0.11-preview.1 | 300 | 9/1/2023 |
3.0.10 | 905,460 | 8/8/2023 |
3.0.10-preview.1 | 808 | 7/13/2023 |
3.0.9 | 1,158,482 | 6/29/2023 |
3.0.9-preview.1 | 284 | 6/29/2023 |
3.0.8 | 11,331 | 6/27/2023 |
3.0.7 | 772,500 | 5/30/2023 |
3.0.6 | 1,471,189 | 4/18/2023 |
3.0.6-preview.1 | 265 | 4/18/2023 |
3.0.5 | 723,269 | 3/30/2023 |
3.0.4 | 176,560 | 3/27/2023 |
3.0.3 | 239,964 | 3/21/2023 |
3.0.2 | 182,265 | 3/13/2023 |
3.0.1 | 155,120 | 3/7/2023 |
3.0.0 | 236,491 | 2/28/2023 |
3.0.0-rc.6 | 10,745 | 2/9/2023 |
3.0.0-rc.5 | 4,626 | 1/26/2023 |
3.0.0-rc.4 | 359 | 1/25/2023 |
3.0.0-rc.3 | 4,182 | 1/18/2023 |
3.0.0-rc.2 | 1,954 | 1/11/2023 |
3.0.0-rc.1 | 13,872 | 12/16/2022 |
3.0.0-preview.19 | 359 | 12/14/2022 |
3.0.0-preview.18 | 531 | 12/6/2022 |
3.0.0-preview.17 | 102,757 | 11/23/2022 |
3.0.0-preview.16 | 131,000 | 10/18/2022 |
3.0.0-preview.15 | 549 | 10/3/2022 |
3.0.0-preview.14 | 8,127 | 9/28/2022 |
3.0.0-preview.13 | 2,581 | 9/6/2022 |
3.0.0-preview.12 | 546 | 8/29/2022 |
3.0.0-preview.11 | 90,410 | 7/20/2022 |
3.0.0-preview.10 | 2,413 | 7/13/2022 |
3.0.0-preview.9 | 22,153 | 6/21/2022 |
3.0.0-preview.8 | 2,600 | 6/9/2022 |
3.0.0-preview.7 | 1,650 | 5/31/2022 |
3.0.0-preview.6 | 6,512 | 5/20/2022 |
3.0.0-preview.5 | 14,218 | 5/4/2022 |
3.0.0-preview.4 | 4,377 | 4/13/2022 |
3.0.0-preview.3 | 461 | 4/12/2022 |
3.0.0-preview.2 | 2,588 | 4/1/2022 |
3.0.0-preview.1 | 2,622 | 3/22/2022 |
2.0.15 | 6,372,566 | 2/9/2023 |
2.0.14 | 10,397,839 | 10/11/2022 |
2.0.13 | 1,115,458 | 9/27/2022 |
2.0.13-preview.1 | 348 | 9/26/2022 |
2.0.12 | 4,546,208 | 8/24/2022 |
2.0.11 | 3,373,959 | 8/11/2022 |
2.0.10 | 1,098,861 | 7/20/2022 |
2.0.9 | 5,705,240 | 6/9/2022 |
2.0.8 | 6,735,763 | 2/18/2022 |
2.0.7 | 4,250,795 | 12/16/2021 |
2.0.6 | 338,916 | 12/2/2021 |
2.0.5 | 7,764,251 | 9/1/2021 |
2.0.4 | 60,314 | 8/24/2021 |
2.0.3 | 462,852 | 8/17/2021 |
2.0.2 | 1,031,918 | 8/11/2021 |
2.0.1 | 201,074 | 8/5/2021 |
2.0.0 | 619,023 | 7/22/2021 |
2.0.0-preview.14 | 2,666 | 7/7/2021 |
2.0.0-preview.13 | 49,078 | 6/18/2021 |
2.0.0-preview.12 | 47,822 | 6/7/2021 |
2.0.0-preview.11 | 64,467 | 5/7/2021 |
2.0.0-preview.10 | 49,929 | 4/21/2021 |
2.0.0-preview.9 | 26,320 | 4/1/2021 |
2.0.0-preview.8 | 41,917 | 3/17/2021 |
2.0.0-preview.7 | 721 | 3/2/2021 |
2.0.0-preview.6 | 578 | 2/24/2021 |
2.0.0-preview.5 | 455 | 2/24/2021 |
2.0.0-preview.4 | 5,256 | 1/6/2021 |
2.0.0-preview.3 | 30,684 | 4/29/2020 |
2.0.0-preview.2 | 2,678 | 4/9/2020 |
2.0.0-preview.1 | 17,260 | 3/9/2020 |
1.25.1 | 13,762,059 | 3/25/2021 |
1.25.1-preview.2 | 443 | 3/25/2021 |
1.25.1-preview.1 | 457 | 3/25/2021 |
1.25.0 | 307,031 | 3/25/2021 |
1.25.0-preview.2 | 474 | 3/20/2021 |
1.25.0-preview.1 | 677 | 3/17/2021 |
1.24.0 | 3,705,973 | 1/19/2021 |
1.24.0-preview.1 | 468 | 1/14/2021 |
1.23.0 | 3,260,604 | 11/26/2020 |
1.22.0 | 3,673,045 | 10/7/2020 |
1.22.0-preview.2 | 554 | 10/6/2020 |
1.22.0-preview.1 | 558 | 7/28/2020 |
1.21.0 | 7,394,595 | 7/28/2020 |
1.21.0-preview.1 | 3,209 | 6/19/2020 |
1.20.1 | 6,047,044 | 3/31/2020 |
1.20.0 | 7,821,157 | 2/5/2020 |
1.19.0 | 3,030,689 | 12/11/2019 |
1.18.0 | 1,508,448 | 10/10/2019 |
1.17.0 | 996,461 | 8/15/2019 |
1.16.0 | 134,778 | 7/3/2019 |
1.15.0 | 2,438,282 | 5/1/2019 |
1.14.1 | 181,497 | 3/29/2019 |
1.14.0 | 1,539,375 | 3/25/2019 |
1.12.0 | 1,429,129 | 10/31/2018 |
1.11.0 | 323,933 | 9/19/2018 |
1.10.0 | 437,394 | 7/6/2018 |
1.9.0 | 1,918,741 | 5/3/2018 |
1.8.1 | 223,726 | 3/23/2018 |
1.7.0 | 209,120 | 12/14/2017 |
1.6.2 | 172,205 | 9/26/2017 |
1.6.1 | 88,216 | 8/24/2017 |
1.6.0 | 55,429 | 8/8/2017 |
1.5.0 | 259,064 | 6/12/2017 |
1.4.0 | 319,101 | 5/10/2017 |
1.3.1 | 78,922 | 4/3/2017 |
1.3.0 | 215,724 | 11/8/2016 |
1.2.1 | 147,449 | 9/27/2016 |
1.1.1 | 12,556 | 8/8/2016 |
1.1.0 | 6,338 | 8/6/2016 |
December 2017 Release Summary (version 1.7.0)
New feature
* Exposed the TimeOut property on IHttpProvider interface. This now allows the timeout to be set for the HTTP client.
* Include symbols in the Nuget package.