Skip to content

WIP: Change Outlook frame to use MS Graph API#218

Open
itsalexjones wants to merge 8 commits intofuel9:masterfrom
itsalexjones:outlook-ms-graph
Open

WIP: Change Outlook frame to use MS Graph API#218
itsalexjones wants to merge 8 commits intofuel9:masterfrom
itsalexjones:outlook-ms-graph

Conversation

@itsalexjones
Copy link
Copy Markdown

@itsalexjones itsalexjones commented Jun 16, 2023

Following the deprecation of basic auth in the Exchange Web Services API, a solution is required for accessing calendar information using modern auth.
This pull request completes that using the Microsoft Graph API.

In making these changes I have been focussed on our use case @global-broadcast-engineering, but have tried to keep existing behaviour intact, but it has not been tested yet.
I am happy to take feedback on the code, and suggestions of minor changes over at #214 - but note that my scope is purely enabling our use case of meeting room booking and free/busy display. Anything requiring significant work that doesn't further that use case may be tricky to get completed.

Notable changes for operators of DisplayMonkey are:

  • In order to use new packages I had to update the Display project to .Net 4.8. Please ensure the runtime for this is present on your system before upgrading.
  • You must set a tenant and client ID in the Presentation app web.config file for this to work. More details below.

Creating an Azure AD Application for Calendar Access

In order to authenticate users via Azure AD, we must register DisplayMonkey in our tenant. To do this:

  1. Log in to the Azure AD portal
  2. Go to Applications -> Application Registration
  3. Click 'New Registration'
  4. Enter a name, select 'This tenant only' and leave redirect URI blank.
  5. Click Register
  6. Once registered, go to the 'Authentication' tab and enable 'Allow public client flows'
  7. On the 'Overview' panel, copy the tenant and client ID to the web.config file

You will also need to provide consent for the accounts you have previously registered (or will register) for the scopes "User.Read", "Calendars.ReadWrite", "Calendars.ReadWrite.Shared", "MailboxSettings.Read". The application does not (currently) provide UI to do this, and the easiest way it to grant admin consent.

Things not explicitly tested - but theoretically working

  • Hiding events based on their sensitivity
  • The management UI still has fields for EWS, these still store the data, but it's no longer used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant