Skip to content

Instantly share code, notes, and snippets.

View kalyankrishna1's full-sized avatar

Kalyan Krishna kalyankrishna1

  • https://github.com/kalyankrishna1/
  • Redmond, WA
  • 17:10 (UTC -12:00)
  • X @kalyankrishna1
View GitHub Profile
/**
1. Create a.NET Core console client app.
2. Add a new Json file named "appsettings.json" in your project, set it property "Copy to output directory" to "Copy if newer".
3. Add the following lines in the appsettings.json
{
"Instance": "https://login.microsoftonline.com/",
"ClientId": "The clientid/appid that you got from the app registration",
"TenantId": "Your Azure AD tenant's id (a guid)",
"RedirectUri": "http://localhost",
"TenantDomain": "Your tenant's domain, like <mytenant>.onmicrosoft.com",
@kalyankrishna1
kalyankrishna1 / Program.cs
Last active October 11, 2024 17:13
Code and steps for the session "An introduction to Microsoft Graph for developers - Advanced topics"
** This builds on the previous sample code provided at https://gist.github.com/kalyankrishna1/0a6ea6d00a09f7ae81c89960e1038d79
--------------------------
2. Add the following using statements on top of the class
using Microsoft.Extensions.Configuration;
using Microsoft.Graph;
using Microsoft.Identity.Client;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@kalyankrishna1
kalyankrishna1 / Program.cs
Last active October 11, 2024 17:13
Code and steps for the session "An introduction to Microsoft Graph for developers - Getting Started"
/**
1. Create a.NET Core console client app.
2. Add a new Json file named "appsettings.json" in your project, set it property "Copy to output directory" to "Copy if newer".
3. Add the following lines in the appsettings.json
{
"Instance": "https://login.microsoftonline.com/",
"ClientId": "The clientid/appid that you got from the app registration",
"TenantId": "Your Azure AD tenant's id (a guid)",
"RedirectUri": "http://localhost",
"TenantDomain": "Your tenant's domain, like <mytenant>.onmicrosoft.com",