marlinspike / GraphAPIDemo

Demo of using the MS Graph API

Repository from Github https://github.commarlinspike/GraphAPIDemoRepository from Github https://github.commarlinspike/GraphAPIDemo

Graph API Demo

A demonstration of using the Graph API SDK to query the MS Graph API for various types of info about a user

Scopes

As configured, the app queries the following scopes (configured in the appsettings.json file):

  • User.Read
  • Calendars.Read
  • Group.Read.All
  • Mail.Read
  • Member.Read.Hidden
  • Contacts.Read

To learn how to configure scopes, see the Microsoft Graph permissions reference

Prerequisites

  • Create an Azure AD Application in your tenant
  • Click the Authentication section in your App Registration, and toggle the Treat application as a public client setting to True

How to use

  • Replace the value for app_id in appsettings.json with the Application (client) ID value from your app registration in Azure AD
  • Run the app
  • You will need to use the console login flow (follow the directions in the console to go to the MS login page, using the unique string as the passcode)

About

Demo of using the MS Graph API


Languages

Language:C# 100.0%