All Projects → microsoftgraph → Msgraph Sdk Dotnet Core

microsoftgraph / Msgraph Sdk Dotnet Core

Licence: other
The core Microsoft Graph client library for .Net. (Microsoft.Graph.Core)

Labels

Projects that are alternatives of or similar to Msgraph Sdk Dotnet Core

Infra Integrations Sdk
New Relic Infrastructure Integrations SDK
Stars: ✭ 42 (-17.65%)
Mutual labels:  sdk
Symbian Archive
A small website to archive Symbian-related dev tools & doc.
Stars: ✭ 46 (-9.8%)
Mutual labels:  sdk
Ans Android Sdk
Analysys Android SDK
Stars: ✭ 49 (-3.92%)
Mutual labels:  sdk
Soflow
A ScriptableObject oriented design SDK.
Stars: ✭ 43 (-15.69%)
Mutual labels:  sdk
Sentry React Native
Official Sentry SDK for react-native
Stars: ✭ 1,032 (+1923.53%)
Mutual labels:  sdk
Dc Management Sdk Js
Amplience Dynamic Content Management SDK
Stars: ✭ 47 (-7.84%)
Mutual labels:  sdk
Openai Api Dotnet
A C#/.NET SDK for accessing the OpenAI GPT-3 API
Stars: ✭ 41 (-19.61%)
Mutual labels:  sdk
Android Pdk
Pinterest Android SDK
Stars: ✭ 49 (-3.92%)
Mutual labels:  sdk
Clarifai Apple Sdk
Artificial Intelligence with a Vision
Stars: ✭ 46 (-9.8%)
Mutual labels:  sdk
Mindconnect Nodejs
NodeJS Library for MindSphere Connectivity - TypeScript SDK for MindSphere - MindSphere Command Line Interface - MindSphere Development Proxy - typescript-sdk is waiting for your contributions!
Stars: ✭ 48 (-5.88%)
Mutual labels:  sdk
Russianpost Sdk
PHP SDK для Почты России
Stars: ✭ 43 (-15.69%)
Mutual labels:  sdk
Meta Zephyr Sdk
Zephyr SDK
Stars: ✭ 45 (-11.76%)
Mutual labels:  sdk
Sdk Ng
New approach for the Zephyr SDK using crosstools-ng
Stars: ✭ 47 (-7.84%)
Mutual labels:  sdk
Snapfeed Sdk
Interactive user feedback tool for Flutter 🎉
Stars: ✭ 43 (-15.69%)
Mutual labels:  sdk
Cli
💻 Decentraland command-line interface
Stars: ✭ 49 (-3.92%)
Mutual labels:  sdk
Memfault Firmware Sdk
Memfault Firmware SDK for embedded systems. More information at https://docs.memfault.com.
Stars: ✭ 42 (-17.65%)
Mutual labels:  sdk
Fbbot
Minimal framework/SDK for facebook messenger bots. BYOS (Bring Your Own Server)
Stars: ✭ 46 (-9.8%)
Mutual labels:  sdk
Kavenegar Python
Kavenegar API Client Writen In Python
Stars: ✭ 50 (-1.96%)
Mutual labels:  sdk
Cos Js Sdk V4
腾讯云 COS JS SDK(JSON API)
Stars: ✭ 49 (-3.92%)
Mutual labels:  sdk
Nodejs
Everything related to the Node.js ecosystem for the commercetools platform.
Stars: ✭ 47 (-7.84%)
Mutual labels:  sdk

Microsoft Graph .NET Core Client Library

Build Status NuGet Version

Integrate the Microsoft Graph API into your .NET project!

The Microsoft Graph .NET Core Client Library contains core classes and interfaces used by Microsoft.Graph Client Library to send native HTTP requests to Microsoft Graph API. The core 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.Core in the NuGet Library, or
  • Type Install-Package Microsoft.Graph.Core into the Package Manager Console.

Getting started

1. Register your application

Register your application to use Microsoft Graph API by following the steps at Register your application with the Microsoft identity platform.

2. Authenticate for the Microsoft Graph service

The Microsoft Graph .NET Client Library does not currently include any default authentication implementations. There are set of preview authentication providers available in the msgraph-sdk-dotnet-auth repo. Alternatively, you can use the built-in DelegateAuthenticationProvider class to authenticate each request. For more information on DelegateAuthenticationProvider, see the library overview.

The recommended library for authenticating against Microsoft Identity (Azure AD) is MSAL.

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

3. Create a HttpClient object with an authentication provider

You can create an instance of HttpClient that is pre-configured for making requests to Microsoft Graph APIs using GraphClientFactory. To create an instance of .NET's HttpClient, you need to provide an instance of IAuthenticationProvider which can authenticate requests to Microsoft Graph.

HttpClient httpClient = GraphClientFactory.Create(IAuthenticationProvider, version: "beta");

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

4. Make requests to the graph

Once you have an authenticated HttpClient, you can begin to make calls to the service. The requests to the service follows our REST API syntax.

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

HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, "me/drive");
HttpResponseMessage response = await httpClient.SendAsync(requestMessage);
if (response.IsSuccessStatusCode)
{
    string jsonResponse = await response.Content.ReadAsStringAsync();
}

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

HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, "me/drive/root");
HttpResponseMessage response = await httpClient.SendAsync(requestMessage);
if (response.IsSuccessStatusCode)
{
    string jsonResponse = await response.Content.ReadAsStringAsync();
}

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.1.

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 [email protected] 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].