

To initialize the ElectronProvider, add the following code to the src/renderer.ts file. The ElectronProvider is responsible for communicating with ElectronAuthenticator (in the main process) to request access tokens and receive information regarding signed in state that is required for the mgt components to work. From the Essentials section, copy the value of the Application (client) ID property.Ĭonfigure the Microsoft Graph Toolkit authentication provider Initializing ElectronProvider in your renderer process.Verify that you are on the Overview page.Confirm changes by selecting the Register button.In the Redirect URI field, in the dropdown, select Public client/native (mobile & desktop), and in the URL field, enter msal://redirect.For the type of supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g.Enter the name for your app for example, My Electron-App.From the top menu, select the New registration button.From the Azure Active Directory menu, select App registrations.From the menu, select Azure Active Directory.


To create an application in Azure Active Directory (Azure AD), you need to add a new application registration, and then configure an app name and redirect URI. npm startĬreate an app/client ID Add new application registration in Azure AD to get a client ID These will allow you to provide authentication for your app using MSAL and use the Microsoft Graph Toolkit components. Install the package that contains all the Microsoft Graph-connected web components. git clone Ĭhange the working directory to the newly created app and install all dependencies. This will create a new Electron app using TypeScript, which will help you write more robust code and avoid runtime errors. Create an Electron appĬreate a new Electron app by cloning the electron-quick-start-typescript repository. After completing the steps, you'll have a Electron app that shows the upcoming appointments of the currently signed in user from Microsoft 365. This article describes the step-by-step process of using the Microsoft Graph Toolkit to create an Electron app and connect it to Microsoft 365.
