Getting Started with Microsoft Graph and .NET SDKs
Key Takeaways
Building applications with Microsoft Graph and .NET SDKs for authentication and API interactions
Full Transcript
everybody I'm Jeremy I'm here with Daryl today thanks for coming Daryl yeah very welcome glad to be here we're going to be talking about the SD net1 so as a.net developer why would I use the Microsoft Groff SDK well the the SDK allows you to just get at the data that is on the graph that much easier we can help you build requests and we can help you do all the serialization and deserialization of models and whole bunch of other stuff so as an example we get a lot of feedback around throttling for instance is there a way that the SDK can make that easier for me as a developer to manage that kind of thing absolutely we handle a whole bunch of different standard HTTP status codes we have a middleware pipeline that kind of sits behind the HP client library and can handle things like 429 responses and 503 responses and all the redirect codes and over time we'll be adding more pieces of middleware to handle those standard HTTP responses that's great so I'm thinking as a developer like if I've already kind of started making a bunch of course the graph in there and now I want to kind of introduce myself to the SDK is it all or nothing' or are there things that I could benefit from if I'm already using HDB crest do get and post calls yeah if you are already using HTTP client we have a mechanism where we have an HP client factory that will create you an HP client there's already been preset up with all these pieces of middleware so you can immediately get all of these retry and throttling type behaviors out of the box and just plug it straight into your existing application that's really neat so how does the developer get started with this could you show us on your computer absolutely well why don't we just start with a demo of the the simplest thing just a console app here I have one pre set up that's just basically empty and I pulled in a couple of packages there's a Microsoft graph package maximum of graph core and the graph off these are the three packages that we're going to use for this demo so here we are first thing we're going to do is we're going to create ourselves a client for the graph and it's called graph service client graph service client there we go excellent okay now as soon as I have that client I can now I have a fluent interface so I can do me to get my data you can get at your messages you get all kinds of data but let's just keep it simple with me I'm gonna convert this into a request now and then do it get an HTTP GET method on it now this we're gonna assign this to a variable here our user equals and that is an async method so we're gonna get there and then when we get that result back we're going to show some information console dot write line so you actually prove that it worked user dot display me okay excellent now you'll notice that we still getting the red squiggly here right because you need to know who I am I need to authenticate myself with against this API so if we hole hit the parenthesis you will see in the intellisense that we need an authentication provider so one third ocation provider is a set of classes that we've created to help you use the identity emcell libraries and we have one for each of the different types of or flow today we're just going to use a simple author interactive flow so that it pops up the sign-in dialogue because that we have a UI here and under the covers that's just using the emcell libraries identity provide yeah absolutely we're just an adapter and we call them cell at the right point and we handle certain errors that come back from em cell and we put the token in the appropriate place in the HTTP request so we're just a thin layer okay so we need an auth provider here Eider equals new interactive authentication provider now it accepts as a parameter a public client application and if you have used them cell that's one of the two initialization classes that M cell uses and we use exactly the same thing so if you already have an app using M cell it's easy to adapt here so we are going to create ourselves an M cell application now you can just new it up as normal but we also have a little helper here to go create your client application now what you need to provide here is a client ID now I don't happen to remember the client ID by heart so I'm going to go Ellie come on joy I've tried it's just that I've got like the first six or seven characters but the rest are still mystery to me okay let's just paste this client ID in here excellent now let's grab that app and put it as a parameter to the auth provider now it needs one more parameter in here we need the Scopes because we want to say what different capabilities we want this application to have in this case we're just accessing user so we can do user dot read as our scope here and you can just do a cut an array of all kinds of different values here so you're doing my old op read or calendar read as well absolutely thanks okay so now we're going to pass our auth provider into the graph service client and we've got it all glued up and when we run this it should work now it's first we're going to ask us to login so it's going to pop up the regular consent of the regular identification dialog but now this because it's the first time we've run this app with this client ID it's now asking us to consent for this application to actually allow you to access the data we hit accept and there we go we get our username displayed we have retrieved data from the graph excellent so there's a lot of value that's kind of hidden underneath those few lines of code to do that that you're getting for free by using our SDK apps rather than rolling it yourself yes that's awesome thanks very much Darryl so if you want to get started this as a developer if you've got a graph Microsoft comm and click on the getting started at the top in the top navigation you'll give you a list of all the different platforms you can use in this case as a.net developer you just click net and you can go check out the SDK and the tutorials to get started so thanks for your time today though you're very welcome
Original Description
Learn how the .NET Microsoft Graph SDKs will help you as a developer, including how the SDK can help with getting an Auth token for the API, status codes and some SDK sample code.
To learn more about the Microsoft Graph and .NET SDKs,
visit https://docs.microsoft.com/en-us/graph/sdks/sdks-overview
For additional Microsoft Graph tools and resources, visit https://graph.microsoft.com.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Microsoft 365 Developer · Microsoft 365 Developer · 24 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
▶
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Adaptive Cards community call-February 2019
Microsoft 365 Developer
PowerApps community call-February 2019
Microsoft 365 Developer
Microsoft Graph community call-March 2019
Microsoft 365 Developer
Office Add ins community call-March 2019
Microsoft 365 Developer
PowerApps community call-March 2019
Microsoft 365 Developer
Microsoft Teams community call-March 2019
Microsoft 365 Developer
Using React and Office UI Fabric React Components
Microsoft 365 Developer
Build Microsoft Teams customization using SharePoint Framework
Microsoft 365 Developer
Microsoft Graph community call-April 2019
Microsoft 365 Developer
Using Change Notifications and Track Changes with Microsoft Graph
Microsoft 365 Developer
Office Add Ins community call-April 2019
Microsoft 365 Developer
Adaptive Cards community call-April 2019
Microsoft 365 Developer
Microsoft Teams community call-April 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Application Registration
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Directory API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Microsoft Teams
Microsoft 365 Developer
Getting Started with Microsoft Graph Explorer
Microsoft 365 Developer
Getting Started with Microsoft Graph
Microsoft 365 Developer
Getting Started with Microsoft Graph and Mail API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Office 365 Groups
Microsoft 365 Developer
Getting Started with Microsoft Graph and the Calendar API
Microsoft 365 Developer
Getting Started with the Microsoft Graph Toolkit
Microsoft 365 Developer
Getting Started with Microsoft Graph and JavaScript SDKs
Microsoft 365 Developer
Getting Started with Microsoft Graph and .NET SDKs
Microsoft 365 Developer
Discover how businesses can be more productive with Microsoft 365 integrations
Microsoft 365 Developer
Adaptive Cards community call-May 2019
Microsoft 365 Developer
Office Add-ins community call-May 2019
Microsoft 365 Developer
Why We Built on Microsoft Teams
Microsoft 365 Developer
Microsoft Teams community call-May 2019
Microsoft 365 Developer
Microsoft Graph community call-June 2019
Microsoft 365 Developer
Build Angular SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Office Add -ins community call-June 2019
Microsoft 365 Developer
Build Android native apps with the Microsoft Graph Android SDK - June 2019
Microsoft 365 Developer
Build MVC apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Authenticate and connect with Microsoft Graph - June 2019
Microsoft 365 Developer
Microsoft Graph data connect - June 2019
Microsoft 365 Developer
Change notifications with Microsoft Graph - June 2019
Microsoft 365 Developer
Build iOS native apps with the Microsoft Graph REST API - June 2019
Microsoft 365 Developer
Build Node.js Express apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Smart UI with Microsoft Graph - June 2019
Microsoft 365 Developer
Leveraging the Microsoft Graph API from the SharePoint Framework - June 2019
Microsoft 365 Developer
Build UWP apps with Microsoft Graph - June 2019
Microsoft 365 Developer
Build React SPA's with Microsoft Graph - June 2019
Microsoft 365 Developer
Getting Started with Microsoft Graph and Batching
Microsoft 365 Developer
Getting Started with Microsoft Graph and Change Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and Consent Permissions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Education
Microsoft 365 Developer
Getting Started with Microsoft Graph and Financials
Microsoft 365 Developer
Getting Started with Microsoft Graph and Excel
Microsoft 365 Developer
Getting Started with Microsoft Graph and Data Connect
Microsoft 365 Developer
Getting Started with Microsoft Graph and Intune
Microsoft 365 Developer
Getting Started with Microsoft Graph and Notifications
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneNote
Microsoft 365 Developer
Getting Started with Microsoft Graph and OneDrive
Microsoft 365 Developer
Getting Started with Microsoft Graph and Open Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Paging
Microsoft 365 Developer
Getting Started with Microsoft Graph and Schema Extensions
Microsoft 365 Developer
Getting Started with Microsoft Graph and Security API
Microsoft 365 Developer
Getting Started with Microsoft Graph and Query Parameters
Microsoft 365 Developer
Getting Started with Microsoft Graph and Reporting API
Microsoft 365 Developer
More on: API Design
View skill →Related Reads
🎓
Tutor Explanation
DeepCamp AI