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:
Log in to the Azure AD portal
Go to Applications -> Application Registration
Click 'New Registration'
Enter a name, select 'This tenant only' and leave redirect URI blank.
Click Register
Once registered, go to the 'Authentication' tab and enable 'Allow public client flows'
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.
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:
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:
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
The management UI still has fields for EWS, these still store the data, but it's no longer used.