Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Desktop application using Electron, Angular 2 and Office 365.

License

Notifications You must be signed in to change notification settings

Cecildt/angular2-O365-desktop-app

Repository files navigation

angular2-O365-desktop-app

Desktop application using Electron, Angular 2, Material Design Lite and Office 365 (Microsoft Graph API).

Application Demo

Getting started

Install dependencies

npm install

To build and watch for changes

npm run watch

Run application

npm start

Debug Electron using Devtron

`

// Run the following from the Console tab of your app's DevTools

require('devtron').install()

// You should now see a Devtron tab added to the DevTools `

Azure AD application Registration

Register this application in the Azure Active Directory service for your Office 365 tenant. Easy to use online tool: Office 365 App Registration Tool

  • App Registration Type: Native Application
  • Redirect URI: http://localhost/callback
  • Select all read items for Users, Groups, Mail, Calendar, Contacts and Files.
  • Register the app and remember to copy your client ID provided to you.
  • Update the azure-config.ts file with your values.

Application Registration

Once your app is registered you need to download the app manifest file from Azure Portal Set "oauth2AllowImplicitFlow": true in application manifest file and upload the manifest file again.

Azure AD Application Permission requirements

You need to make sure the application permission is set correctly to have access to the Microsoft Graph resource. This can be done in the Azure Portal.

Required Permissions

  • Read all notebooks that the user can access
  • Access user's data anytime
  • Read items in all site collections
  • Read files that the user selects
  • Read user files and files shared with user
  • Read user contacts
  • Read user calendars
  • Read user mail
  • Read directory data
  • Read all groups
  • Read all users' full profiles
  • Read all users' basic profiles
  • Sign in and read user profile
  • Read user notebooks
  • Read users' relevant people list

Go to Microsoft Graph API if you want to know more.

Application Build & Deployment

Follow Electron documentation for build for Windows, Linux and OSX.

To package files for deployment:

  • npm install -g asar
  • asar pack angular2-O365-desktop-app app.asar

TODO Packaging: https://www.xplatform.rocks/2016/02/14/angular2-and-electron-the-definitive-guide/

** More details to follow **

Resources

If you have any issues or suggestion please submit on GitHub Issues.