Guides

Microsoft Teams Configuration

Overview

The Online Meeting Integration tool in aPlus+ allows faculty to connect to Microsoft Teams to import meeting attendance where participants can be matched to students in aPlus+.

There are the following steps to the configuration:

  • In aPlus+ create a connection to Microsoft Teams in order to obtain the Redirect URL.
  • In Azure Active Directory create an App Registration for the aPlus+ connection using the Redirect URL.
  • Return to the aPlus+ Microsoft Teams connection to set the Client ID and Secret.
  • Users can then connect individually connect to Microsoft Teams to gather meeting attendance.

About OAuth and Microsoft Teams Apps

OAuth is an open standard which allows a service (Microsoft Teams) to provide a third party tool (aPlus+) with access to data on behalf of a Microsoft Teams user. Creating an App Registration within Microsoft Teams is required to provide aPlus+ with access as the app is configured to know about aPlus+, which information can be accessed, and has a shared secret which ensures that only aPlus+ is able to access the Microsoft Teams data.

In this context, aPlus+ is the App, which is connecting to Microsoft Teams.

First create a connection to MS Teams from aPlus+

In this step, a connection will be created with a temporary Microsoft Teams Client ID and Secret. These will be set later after the Microsoft Teams app has been created as they are provided by Microsoft Teams.

The aPlus+ Microsoft Teams connection must be created first in order to obtain the Redirect URL which is unique to the connection.

  • Log into aPlus+ as an aPlus+ administrator user.
  • Open the Online Meeting Integration page at Admin > Plug-Ins > Online Meeting Integration
  • Click the ‘+ Add connection’ option at the right.
  • Select “Microsoft Teams” as the online meeting platform and click Next.
Document image

  • The Redirect URL won’t be available until the connection is saved.
Document image

  • Enter a temporary Application ID, Directory ID and Secret and save the connection.
  • Click on the new connection you’ve just created, to open it for editing again.
  • Make a note of the Redirect URL for this connection - this is required to configure Microsoft Teams
Document image

  • You must return to this connection later to update the Application ID, Directory ID and Secret which Microsoft Teams will provide for you.

Create Microsoft Teams App Registration

Document image

  • Click through to App Registrations.
Document image

  • Choose to create a new registration
Document image

  • Complete the following fields to register the app:
    • Name: This can be any name. Suggestion “aPlus+ Attendance”
    • Supported account types: Accounts in this organizational directory only
    • Redirect URI: Select Web from the list and enter the Redirect URL from when you previously configured the connection within aPlus+.
    • Click Register.
Document image

  • Determine the Application (client) ID and Directory (tenant) ID. These are located on the app registration Overview and they must be added to the connection you created in aPlus+.
Document image

  • Add a client secret. On the menu of the app registration choose ‘Certificates & Secrets’:
Document image


Then click New client secret, enter a name such as ‘aPlus+ Attendance Secret YYYY’ where YYYY is the current year, specify an expiry period (suggest 12 months) and click ‘Add’. The secret will be generated for you and added. You can copy this using the copy button beside the secret – note it’s the value which is the actual secret. This value must be added as the secret to the connection within aPlus+. 

Suggest setting up a reminder to configure a new secret before this one expires.

Document image

  • Make sure you have configured the aPlus+ connection Application (client) ID and Directory (tenant) ID and Secret.

Permissions

The following permissions must be set in order to allow the app to connect to user’s meeting information.

Document image


To set these:

Navigate to API Permissions



Document image


Add the permissions as shown in the screenshot at the top of this section.



Document image


Then select Delegated Permissions



Document image


Then select the permissions below



Document image

Document image


After adding these permissions, select “Grant admin consent for aPlus+ Attendance”



Document image


Authorizing access

When an aPlus+ user first clicks through to this connection they will be asked to authorize the app. The screen below shows what a user will see.

Document image




Troubleshooting

Microsoft Teams secret expiry

There may be access problems due to expiry of security credentials. Secrets have an expiry period, typically 12 months but this is configured when the secret is created. Check the app registrations in the Azure portal. Expiry is indicated on the right column of the app registration list. To solve this click through to the app registration and you will be prompted to create a new secret and specify an expiry period. After updating the secret you may need to access the connection in aPlus+ and clear access tokens.

Document image


Microsoft Teams errors

API responded with no online meetings in response. This most likely will occur when a manually entered meeting join url is not found by Microsoft Teams. Check the join url.

Not found. A calendar event may be found, but the online meeting associated with it may not exist via the Microsoft Teams API. This could occur if it’s been a long time since the meeting occurred.

Unable to get microsoftTeams token. This could be caused by an expired secret. Visit the relevant app registration in the Azure Portal and under Certificates and Secrets inspect the expiry date of the client secret currently used in aPlus+. You may need to create a new client secret and update aPlus+ with the value of the new secret.

Refused to connect. When connecting to Microsoft Teams using aPlus+ within Canvas, the below refused to connect error page may be shown. This is due to Microsoft Teams not allowing logging in from within an iframe for security reasons. The solution is to either log into Microsoft Teams in advance using the same web browser or to open attendance in its own browser tab.

Document image


Technical reference

API Calls

The following API endpoints are called.

https://graph.microsoft.com/beta/me/calendar/calendarView https://graph.microsoft.com/beta/me/onlineMeetings https://graph.microsoft.com/beta/me/onlineMeetings/{meetingID}/attendanceReports https://graph.microsoft.com/beta/me/onlineMeetings/{meetingID}/meetingAttendanceReport https://graph.microsoft.com/beta/me/onlineMeetings/{meetingID}/attendanceReports/{reportID}

Processing logic

This is a summary of how the system determines which meetings to show. At the time of writing there is not always a direct relationship between a recurring calendar item and the online meetings which are started for that item. MS Teams allows an online meeting to be initiated for a scheduled calendar item at any time, not at the date and time it’s scheduled for – you can “join” the next day or week. Every time the meeting is started, an occurrence of that meeting is recorded and it’s associated with the “master” of any recurring event. This makes the processing a bit more involved and it works like this:

  1. Get a list of all online meeting events in the calendar which occur for the time period.
  2. For each discrete event or event series, get the associated online meeting. There is just one online meeting for recurring events.
  3. For each online meeting, get a list of all occurrences of a started meeting. Filter that list so that only those occurrences which occur during the required date range is shown.
  4. Show this list of occurrences, and indicate which if any are recurring.

Configuration and Notes

There are some items that need to be completed prior to usage by instructors

  • Microsoft Teams Attendance Status
    • When the Microsoft Teams module is used to mark attendance, it will use the attendance status that is assigned to it. This needs to be defined before the first use.
    • (Optional) If you wish to have a specific attendance status setup that is unique to the Microsoft Teams integration, you will first need to set that status up in the attendance setting admin page. In the admin portal this can be found under “Admin -> Attendance -> Statuses”
    • To configure the Microsoft Teams attendance status:
      • Navigate to “Admin -> Plug-ins -> Plug-in Settings”
      • Expand “Online Meeting Integration”
      • Select the “Attended Status” setting and enter the name of the attended status before selecting save. Its best to copy and paste this from the attendance status setup page, to make sure the name is an exact match.
Document image

  • Meeting look back days and Meeting look forward days
    • By default meetings which occur +/- 24 hours of the session date and time will be shown. This can be changed if you need to show meetings which occur earlier than this, relative to the date and time of the session.
    • To configure:
      • Navigate to “Admin -> Plug-ins -> Plug-in Settings”
      • Expand “Online Meeting Integration”
      • Select the setting to change and enter a number of days. Fractional values are allowed. The settings are “Meeting look back days” and “Meeting look forward days”. Note that the online meeting platform (Microsoft Teams) may interpret fractional days to whole days.
  • How Students are matched

aPlus+ attempts to match the Microsoft Teams attending students to the course roster, first by their primary email, and then by name. For the most accurate results we recommend that students are required to register when joining Microsoft Teams sessions, and to use their primary email address that is stored in Canvas, as that is where aPlus+ gets its email addresses from.