Adjunct for Microsoft Graph manages user authentication with Microsoft Azure AD as well as API calls to Microsoft Graph. This library is especially designed for SPA's (Single Page Applications) and works well with popular frameworks such as React, Vue and Angular.
Add Adjunct for Microsoft Graph to your project:
npm install @adjunct-js/adjunct-graph
The @adjunct/adjunct-graph
library acts as a wrapper around the MSAL @azure/msal-browser
library which securely handles authentication, authorization and access token generation. In addition, it uses the Fetch API to make REST calls.
Before you can get started with @adjunct/adjunct-graph
you need to register your application in the Azure Portal. You can follow the Microsoft Instructions or the simple steps below.
- Sign in to the Azure Portal
- Select the Azure Active Directory
- Select App Registrations
- Select New Registration
- Configure your application
Configure your app registration accordingly but ensure your Redirect URL is configured to the URL of the application page which will process user authentication (more details in [Authentication]#authentication).
The minimum recommended API Permission to provide users is User.Read which allows your application to read the users details. However, depending on the Microsoft Graph resources you need for your application you will need to grant more permissions.