Solution overview - OfficeDev/microsoft-teams-apps-timetally GitHub Wiki
Time Tally app enables users to ease timesheet filling. Multiple tasks can be included in a project, and multiple projects assigned to employees, so that it is super easy for them to fill timesheet using mobile device and managers do not have to check with employees on timesheet entry. Managers get to view the project utilization based on resource & approve/reject the entries. Reminder notifications will also be sent to ensure timesheet compliance. Historical data and utilizations will also be shown for analytics.
Timesheet App: This is a web application built using the Bot Framework SDK v4 for .NET and ASP.NET Core 3.1. App will work in personal scope for both end users and managers. End users will have a tab for filling and submitting timesheet. Managers will have a tab to review subordinates’ timesheets and manage projects.
Azure solution
- The App Service implements the Bot experience by providing end points for user communication. The app service hosts the React app in order to display tabs for filling timesheet and manager dashboard for managing projects and reviewing timesheets.
- App endpoint is registered as messaging end point in bot registration portal and provides an endpoint /api/messages to process bot requests/response.
- App service hosts React application for tabs and provides custom APIs in back end for fetching and storing data securely.
- Single Sign-On experience is implemented in React application for seamless user authentication.
Azure Bot Service: Azure Bot Service is developed using BOT SDK v4. Timesheet web app endpoint is registered as messaging end point in bot registration portal.
Application Insights: Application Insights is used for tracking and logging. Details are provided in section Telemetry.
Data stores:
- The web app is using Azure SQL Database for data storage as it is relational database which can be conveniently used to join and query multiple tables and also supports transactions.
- Azure SQL tables are used to store timesheet, project and task details. It also saves bot conversation Ids for all users to send notifications.
Microsoft Graph APIs: - The app leverage Microsoft Graph APIs for user details, getting user's manager, and getting user's subordinates.
Sr No | Use case | API | Delegated permissions | Application permissions |
---|---|---|---|---|
1 | Get user details | https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http | User.Read.All | NA |
2 | User’s manager | https://docs.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http | User.Read.All | NA |
3 | User’s direct reports | https://docs.microsoft.com/en-us/graph/api/user-list-directreports?view=graph-rest-1.0&tabs=http | User.Read.All | NA |
Authentication:
- App Service Authentication: Single Sign-On experience is implemented in React application for seamless user authentication. The configuration setting is done at Bot channel registration in azure portal with defined graph scope of User.Read.All which can be consented by tenant users.
- Task Module Authentication: The Task Module rendering custom UI page to fetch list of users from Graph APIs uses the token passed by bot handler during task/invoke action.
Function App:
- This will be a time triggered Function App which will be used to send reminder notifications to all end-users in personal scope.