Skip to content

YakubYo/Lumen-IoD-Scheduler

Repository files navigation

Lumen-IoD-Scheduler demo application

Schedule Lumen Internet-on-Demand bandwidth changes right from your calendar

Synopsis:

This is a sample Windows Console app that reads events from a Microsoft 365 calendar, determines what bandwidth update actions to take, and then calls the Lumen IoD APIs to update the bandwidth at the scheduled time.

The period in which to monitor the Microsoft 365 calendar is configurable (defaults to 6 hours). To monitor a calendar around the clock, you would run a process like this via a cronjob, scheduled task, Windows service, etc. No data is written or stored locally other than output log files. To view examples of how bandwidth actions are determined (including how conflict resolution works), please see the Lumen-IoD-Scheduler overview.

Setup:

Dependencies:

Microsoft 365 license for work/school (Personal account can be used for testing)

Configuration:

  1. Microsoft 365 calendar created and permissioned to specified user(s)
  2. Registered application in Azure Entra ID to allow calendar access through Microsoft Graph APIs:
    1. Including client secret and Graph API permissions (Calendars.Read and User.Read.All)
    2. To test with a personal Outlook account in Visual Studio or VS Code:
      1. configure the Entra ID app to enable device code flow
      2. Add https://localhost as the Redirect URI
      3. Set the tenantId in appsetting.json to "common"
  3. Registered application in Lumen Developer Center for IoD
    1. Including client secret

Graph API required permissions:

GraphPermissions

Enabling device code flow (for personal account testing):

AllowPublicClientFlows

Redirected to localhost (for personal account testing):

RedirectURI

Microsoft 365 Calendar Id:

One manner of finding your calendar Id value is by using Graph Explorer, such as the via the list calendars call. There are other methods to get this Id that can be found with a quick web search.

Settings:

Most settings are in the appsettings.json file. This includes the ability to change the time interval, set the regular expression pattern to match the calendar event subject line, the location of the output log file, as well as connection information for Graph APIs and Lumen APIs.

In addition, configuration information is in IoD-Json/bandwidthUpdate.json, specifically in the "relatedContactInformation" section at the bottom. You should specify an emailAddress here in order to receive the status notification mail from Lumen once the bandwidth update action has processed.

Contact:

For questions or feedback, please contact Jacob Johansen at jakejoh@hotmail.com.

Resources:

Use the Microsoft Graph API - Microsoft Graph | Microsoft Learn

Microsoft Graph authentication and authorization overview | Microsoft Learn

Register an application with the Microsoft identity platform - Microsoft Graph | Microsoft Learn

Developer Center support | Lumen

Lumen Developer Center | Internet On-Demand

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages