Sample single page application showing Microsoft 365 profile using a Kiota generated API client from Microsoft Graph
This repo contains a sample single page application (SPA) that demonstrates how to use an API client generated by the Kiota API client generation tool to call the Microsoft Graph me
endpoint.
The goal of Kiota is to eliminate the need to take a dependency on a different API SDK for every API that you need to call. Kiota API clients provide a strongly typed experience with all the features you expect from a high quality API SDK, but without having to learn a new library for every HTTP API.
Kiota is a lightweight and fast code generator that can help you discover, explore and call any HTTP API with minimal effort. Kiota also provides the ability to only generate code for the parts of an API that you care about. The footprint of the generated code is only what you need to make you productive.
- node.js LTS
- Microsoft 365 developer tenant, you can get it for free through the Microsoft 365 developer program
- Clone the repo
- Start terminal, change the working directory to the repo folder and run:
chmod +x scripts/aad.sh
- Run the setup script: ./scripts/aad.sh
- Start the development server:
npm start
- In your web browser open
http://localhost:1234
- Retrieving the Microsoft 365 profile of the current user with the Kiota generated API client using TypeScript
- Facilitate authentication and authorization using the @azure/msal-browser Public Client
- Registering a new Azure AD application for a single page app using CLI for Microsoft 365