Solution overview - OfficeDev/microsoft-teams-apps-attendance GitHub Wiki

Attendance app is a Power Apps application using Power Automate and connectors such as OneDrive, SharePoint list, Office365Users, Office365Groups.

Power App

The app package contains the manifest JSON file, Flow and Power App configuration files which also include the .msapp file. The files in the Flow folder provide the connection details for all the data sources used in the app.

  • During first time sign-in, user will be asked to provide consent to access SharePoint site as configured in app and their One Drive & Office 365 groups.
  • Once sign-in, Office 365 group connector will fetch the list of all Teams (classes) where user has owner access. The list gets binds to the class picker.
  • App provides 2 time selectors in 'Take Attendance' page to select the date and drop down to select the hours and minutes to get the session time.
  • With every change event, application checks the SharePoint list to compare whether the session exists. In case of no session for provided date time, Initiate button gets enabled else Edit.
  • Initiate will trigger SharePoint connector to add session metadata information and using Office365Groups connector reads the team members (students) and add each student entry in SharePoint list named AttendanceRecord.
  • Edit will read the AttendaceRecord SharePoint list to fetch student records. Currently app allows to Edit student attendance up to last 7 days.
  • Historical Attendance page reads the AttendanceRecord based on selected date range.
  • Microsoft Power Automate (Flows) is used to perform Export operation.
  • Flow connector fetches the student records from SharePoint list based on selection and exports to teacher's OneDrive.
  • Currently there are no limitations in date range selection for historical data.

Power Automate

Attendance app is using Power Automate platform to export student records in OneDrive. Power Automate transforms the SharePoint list data into CSV file which gets exported to the Teacher's personal OneDrive.

Connectors

Attendance app is using following connectors:

  • SharePoint to save and read data from a SharePoint list
  • Flows to process student records from SharePoint list and export to CSV file in OneDrive
  • Office365Groups to read group member list
  • Office365Users to read user profile information
  • OneDrive to place export file information

There are two types of user roles for the underlying SharePoint site:

  • App Owners: App owners will create the SharePoint list and provide appropriate access to teachers.
  • App Members: All teachers who use the app will be App members and be able to perform read/write operations on the SharePoint lists.