How to access Microsoft Graph APIs for my Web Form including authentication?

Jeeva Anbalagan 11 Reputation points

I am using ASP.Net Web forms but not in MVC pattern. In this, i would like to authenticate my web app using MS Graph API and how to access any MS Graph APIs further into the site? need some help on this.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,146 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
3,386 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Shweta Choudhary 601 Reputation points Microsoft Employee

    Thank you for reaching out.

    Microsoft Graph enables developers to consume user information stored in Microsoft 365 in custom applications. Data is retrieved from Microsoft Graph through a REST API or using one of the various native SDKs provided by Microsoft.

    Follow this tutorial to learn how to work with the Microsoft Graph .NET SDK to create an ASP.NET web application to access data in Microsoft 365


  2. Rolling stones 1 Reputation point

    How to access microsoft graph toolkit from my Web Form ?

    I am using ASP.Net Web forms but not in MVC pattern. In this, i would like to add to my application MS Graph Toolkit by adding tag into my aspx page susch as <mgt-agenda></mgt-agenda>, I need some help on this. I have tried to add the javascript library but it doesn't work.

    dotnet-aspnet-webforms microsoft-graph-toolkit

  3. Bruce ( 59,546 Reputation points

    the MS Graph Toolkit is a javascript library. there are two forms, the react library (used by the office team) and a web components library based on a new browser technology.

    this would be an alternative to writing a webform application. Instead you write a javascript app. a webform page can host an javascript application. for ajax to call the server, you would typically use use page webmethods, but you can add webapi support to webforms app and have the ajax call webapi methods.

    the webform server can call the graphapi using the bearer token passed in the ajax calls. if the server needs to validate the token, then you need to add the owin middleware to your project and use its oauth support

    0 comments No comments